-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bcf245
commit ce64191
Showing
6 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
88 changes: 88 additions & 0 deletions
88
docs/src/content/components/divider/Demos/InsetLeftDemo.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import React from 'react'; | ||
import { View } from 'react-native'; | ||
import { ComponentDemo, CodeInline } from '@components'; | ||
import { Divider, List, ListItem, Avatar } from '../../../../../../src/index'; | ||
|
||
export const code = `class DialogPage extends React.Component { | ||
constructor(props) { | ||
super(props) | ||
} | ||
render() { | ||
return ( | ||
<List subheader={'Favorites'} style={{ width: 300 }}> | ||
<ListItem | ||
text={'Janet Perkins'} | ||
media={ | ||
<Avatar | ||
type="icon" | ||
content="person" | ||
contentColor={'#ececec'} | ||
color={'#a3a3a3'} | ||
size={40} | ||
/> | ||
} | ||
/> | ||
<ListItem | ||
text={'Mary Perkins'} | ||
media={ | ||
<Avatar | ||
type="icon" | ||
content="person" | ||
contentColor={'#ececec'} | ||
color={'#a3a3a3'} | ||
size={40} | ||
/> | ||
} | ||
/> | ||
<Divider insetLeft={20} /> | ||
<ListItem | ||
text={'Peter Carlsson'} | ||
media={ | ||
<Avatar | ||
type="icon" | ||
content="person" | ||
contentColor={'#ececec'} | ||
color={'#a3a3a3'} | ||
size={40} | ||
/> | ||
} | ||
/> | ||
<ListItem | ||
text={'Trevor Hansen'} | ||
media={ | ||
<Avatar | ||
type="icon" | ||
content="person" | ||
contentColor={'#ececec'} | ||
color={'#a3a3a3'} | ||
size={40} | ||
/> | ||
} | ||
/> | ||
</List> | ||
); | ||
} | ||
} | ||
`; | ||
|
||
const SubtitleDemo = ({ pageHref }) => ( | ||
<ComponentDemo | ||
sectionName={'InsetLeft'} | ||
sectionHref={`${pageHref}#insetleft`} | ||
sectionId={'insetleft'} | ||
code={code} | ||
description={ | ||
<div> | ||
<CodeInline code="insetLeft" type="prop" /> shortens the width of the | ||
divider by the provided amount and moves the{' '} | ||
<CodeInline code="Divider" type="element" /> to the right by that | ||
amount. This is useful for keeping the{' '} | ||
<CodeInline code="Divider" type="element" /> inline with other elements. | ||
</div> | ||
} | ||
scope={{ View, Divider, List, ListItem, Avatar }} | ||
/> | ||
); | ||
export default SubtitleDemo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters