-
Notifications
You must be signed in to change notification settings - Fork 1
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
bb9f757
commit 58d6c44
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
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,16 @@ | ||
import React from "react"; | ||
import classNames from "classnames"; | ||
import useStyles from "./styles"; | ||
|
||
const HorizontalBulletList = props => { | ||
const classes = useStyles(); | ||
return ( | ||
<ul className={classNames(classes.root, props.className)}> | ||
{props.children} | ||
</ul> | ||
); | ||
}; | ||
|
||
HorizontalBulletList.defaultProps = {}; | ||
|
||
export default HorizontalBulletList; |
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,31 @@ | ||
import React from "react"; | ||
import theme from "../../theme"; | ||
import { HorizontalBulletList } from "../../index"; | ||
import { storiesOf } from "@storybook/react"; | ||
import { jsxDecorator } from "storybook-addon-jsx"; | ||
import { muiTheme } from "storybook-addon-material-ui"; | ||
import { Typography } from "@material-ui/core"; | ||
|
||
const stories = storiesOf("Horizontal bullet list", HorizontalBulletList); | ||
|
||
stories.addDecorator(jsxDecorator).addDecorator(muiTheme([theme])); | ||
|
||
stories.add("Default", () => ( | ||
<HorizontalBulletList> | ||
<Typography component="li" variant="body2"> | ||
Hello | ||
</Typography> | ||
|
||
<Typography component="li" variant="body2"> | ||
Hello | ||
</Typography> | ||
|
||
<Typography component="li" variant="body2"> | ||
Hello | ||
</Typography> | ||
|
||
<Typography component="li" variant="body2"> | ||
Hello | ||
</Typography> | ||
</HorizontalBulletList> | ||
)); |
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,21 @@ | ||
import { makeStyles } from "@material-ui/styles"; | ||
|
||
export default makeStyles(theme => ({ | ||
root: { | ||
paddingLeft: 0, | ||
listStyleType: "none", | ||
"& li": { | ||
display: "inline", | ||
whiteSpace: "nowrap", | ||
marginRight: theme.spacing(2), | ||
color: "rgba(0,0,0,.36)", | ||
}, | ||
"& li:after": { | ||
content: '"·"', | ||
marginLeft: theme.spacing(2), | ||
}, | ||
"& li:last-child::after": { | ||
content: "none", | ||
}, | ||
}, | ||
})); |
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