Skip to content

Commit 8537af8

Browse files
rakeshgundukadanilowoz
authored andcommitted
Added traditional list with bullets (#25)
* Added traditional list with bullets * Updated bullet-list cicle radius * Updated bullet-list rect radius
1 parent 4ce1ace commit 8537af8

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import FacebookStyle from './stylized/FacebookStyle'
77
import InstagramStyle from './stylized/InstagramStyle'
88
import CodeStyle from './stylized/CodeStyle'
99
import ListStyle from './stylized/ListStyle'
10+
import BulletListStyle from './stylized/BulletListStyle'
1011
// Custom
1112
import Rect from './custom/Rect'
1213
import Circle from './custom/Circle'
@@ -71,6 +72,9 @@ class ContentLoader extends React.Component<Props, State> {
7172
case 'list':
7273
return <ListStyle {...this.state} />
7374

75+
case 'bullet-list':
76+
return <BulletListStyle {...this.state} />
77+
7478
default:
7579
case 'facebook':
7680
return <FacebookStyle {...this.state} />

src/stylized/BulletListStyle.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//@flow
2+
import * as React from 'react'
3+
import Wrap from '../Wrap'
4+
import type { WrapProps } from '../Wrap';
5+
6+
const BulletListStyle = (props: WrapProps): React.Element<*> => {
7+
return (
8+
<Wrap {...props}>
9+
<circle cx="10" cy="20" r="8" /><rect x="25" y="15" rx="5" ry="5" width="220" height="10" />
10+
<circle cx="10" cy="50" r="8" /><rect x="25" y="45" rx="5" ry="5" width="220" height="10" />
11+
<circle cx="10" cy="80" r="8" /><rect x="25" y="75" rx="5" ry="5" width="220" height="10" />
12+
<circle cx="10" cy="110" r="8" /><rect x="25" y="105" rx="5" ry="5" width="220" height="10" />
13+
</Wrap>
14+
)
15+
}
16+
17+
export default BulletListStyle

stories/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ storiesOf('ContentLoader', module)
2929
.add('instagram style', () => <Container><ContentLoader type='instagram' /></Container>)
3030
.add('code style', () => <Container><ContentLoader type='code' /></Container>)
3131
.add('list style', () => <Container><ContentLoader type='list' /></Container>)
32+
.add('bullet list style', () => <Container><ContentLoader type='bullet-list' /></Container>)
3233
.add('custom style', () => <Container><MyLoader /></Container>)

0 commit comments

Comments
 (0)