-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement badge component and it's variations Closes DCOS-21610
- Loading branch information
1 parent
b794c31
commit 4e70e41
Showing
7 changed files
with
236 additions
and
170 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,38 @@ | ||
import * as React from "react"; | ||
import { storiesOf } from "@storybook/react"; | ||
import { withReadme } from "storybook-readme"; | ||
import Badge from "../badge"; | ||
import { Badge } from "../../index"; | ||
|
||
const BadgeReadme = require("../README.md"); | ||
|
||
storiesOf("Badge", module) | ||
.addDecorator(withReadme([BadgeReadme])) | ||
.addWithInfo("default", () => <Badge>default</Badge>) | ||
.addWithInfo("success", () => <Badge appearance="success">success</Badge>) | ||
.addWithInfo("information", () => <Badge appearance="information">information</Badge>) | ||
.addWithInfo("warning", () => <Badge appearance="warning">warning</Badge>) | ||
.addWithInfo("danger", () => <Badge appearance="danger">danger</Badge>) | ||
.addWithInfo( | ||
"Default", | ||
() => <Badge>Default</Badge> | ||
) | ||
.addWithInfo( | ||
"Success", | ||
"Represents something positive.", | ||
() => <Badge theme="success">Success</Badge> | ||
) | ||
.addWithInfo( | ||
"Primary", | ||
"Represents something more significant than a default.", | ||
() => <Badge theme="primary">Primary</Badge> | ||
) | ||
.addWithInfo( | ||
"Danger", | ||
"Represents something in a danger or error state.", | ||
() => <Badge theme="danger">Danger</Badge> | ||
) | ||
.addWithInfo( | ||
"Warning", | ||
"Represents something that we want to warn the user about but not quite extreme as a danger state.", | ||
() => <Badge theme="warning">Warning</Badge> | ||
) | ||
.addWithInfo( | ||
"Outline", | ||
"Outline badges for when we want the density of the badge to be lighter e.g. when next to data in a table cell", | ||
() => <Badge theme="outline">Outline</Badge> | ||
) |
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
Oops, something went wrong.