This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 167
/
index.jsx
53 lines (50 loc) · 1.68 KB
/
index.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* estline-disable import/no-extraneous-dependencies */
import React from 'react';
import { storiesOf } from '@storybook/react';
import Badge from '../src/Badge';
const Icon = (<svg className="terra-Icon" height="12px" width="12px" viewBox="0 0 48 48">
<path d="M24 0h-.1C10.7 0 0 10.8 0 24c0 13.3 10.7 24 24 24s24-10.7 24-24S37.3 0 24 0zm-4 36.4L6.7 23.1l3.6-3.6 9.7 9.9 17.7-17.9 3.6 3.6L20 36.4z" fill="#FFF" />
</svg>);
storiesOf('Badge', module)
.add('Default', () => (
<Badge text="Default" />
))
.add('Icon', () => (
<div>
<Badge icon={Icon} text="icon" id="text-right" />
{' '}
<Badge icon={Icon} text="icon" isReversed id="text-left" />
{' '}
<Badge icon={Icon} id="no-text" />
</div>
))
.add('Intent', () => (
<div>
<Badge text="Default" id="default-badge" />
{' '}
<Badge intent="primary" text="Primary" id="primary-badge" />
{' '}
<Badge intent="secondary" text="Secondary" id="secondary-badge" />
{' '}
<Badge intent="positive" text="Positive" id="positive-badge" />
{' '}
<Badge intent="negative" text="Negative" id="negative-badge" />
{' '}
<Badge intent="warning" text="Warning" id="warning-badge" />
{' '}
<Badge intent="info" text="Info" id="info-badge" />
</div>
))
.add('Size', () => (
<div>
<Badge size="tiny" text="Tiny" id="tiny-badge" />
{' '}
<Badge size="small" text="Small" id="small-badge" />
{' '}
<Badge size="medium" text="Medium" id="medium-badge" />
{' '}
<Badge size="large" text="Large" id="large-badge" />
{' '}
<Badge size="huge" text="Huge" id="huge-badge" />
</div>
));