|
1 | 1 | import * as React from "react"; |
2 | 2 | import { storiesOf } from "@storybook/react"; |
3 | 3 | import { withReadme } from "storybook-readme"; |
4 | | -import Badge from "../badge"; |
| 4 | +import { Badge } from "../../index"; |
5 | 5 |
|
6 | 6 | const BadgeReadme = require("../README.md"); |
7 | 7 |
|
8 | 8 | storiesOf("Badge", module) |
9 | 9 | .addDecorator(withReadme([BadgeReadme])) |
10 | | - .addWithInfo("default", () => <Badge>default</Badge>) |
11 | | - .addWithInfo("success", () => <Badge appearance="success">success</Badge>) |
12 | | - .addWithInfo("information", () => <Badge appearance="information">information</Badge>) |
13 | | - .addWithInfo("warning", () => <Badge appearance="warning">warning</Badge>) |
14 | | - .addWithInfo("danger", () => <Badge appearance="danger">danger</Badge>) |
| 10 | + .addWithInfo( |
| 11 | + "Default", |
| 12 | + () => <Badge>Default</Badge> |
| 13 | + ) |
| 14 | + .addWithInfo( |
| 15 | + "Success", |
| 16 | + "Represents something positive.", |
| 17 | + () => <Badge theme="success">Success</Badge> |
| 18 | + ) |
| 19 | + .addWithInfo( |
| 20 | + "Primary", |
| 21 | + "Represents something more significant than a default.", |
| 22 | + () => <Badge theme="primary">Primary</Badge> |
| 23 | + ) |
| 24 | + .addWithInfo( |
| 25 | + "Danger", |
| 26 | + "Represents something in a danger or error state.", |
| 27 | + () => <Badge theme="danger">Danger</Badge> |
| 28 | + ) |
| 29 | + .addWithInfo( |
| 30 | + "Warning", |
| 31 | + "Represents something that we want to warn the user about but not quite extreme as a danger state.", |
| 32 | + () => <Badge theme="warning">Warning</Badge> |
| 33 | + ) |
| 34 | + .addWithInfo( |
| 35 | + "Outline", |
| 36 | + "Outline badges for when we want the density of the badge to be lighter e.g. when next to data in a table cell", |
| 37 | + () => <Badge theme="outline">Outline</Badge> |
| 38 | + ) |
0 commit comments