Unverified Commit 3ce62cc3 authored by Marcos Iglesias's avatar Marcos Iglesias Committed by GitHub

Completing storybook for Flag component (#622)

Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>
parent 537c1432
import React from 'react';
import { storiesOf } from '@storybook/react';
import { BadgeStyle } from 'config/config-types';
import StorySection from '../StorySection';
import Flag, { CaseType } from '.';
export default {
title: 'Components/Flags',
component: Flag,
};
const stories = storiesOf('Components/Flags', module);
export const SimpleFlag = () => {
return <Flag caseType={CaseType.LOWER_CASE} text="Test Flag" />;
};
SimpleFlag.story = {
name: 'simple flag',
};
stories.add('Flags', () => (
<>
<StorySection title="Lower Case Flag">
<Flag caseType={CaseType.LOWER_CASE} text="Test Flag" />
</StorySection>
<StorySection title="Upper Case Flag">
<Flag caseType={CaseType.UPPER_CASE} text="Test Flag" />
</StorySection>
<StorySection title="Sentence Case Flag">
<Flag caseType={CaseType.SENTENCE_CASE} text="Test Flag" />
</StorySection>
<StorySection title="Default Style Flag">
<Flag
caseType={CaseType.SENTENCE_CASE}
text="Test Flag"
labelStyle={BadgeStyle.DEFAULT}
/>
</StorySection>
<StorySection title="Primary Style Flag">
<Flag
caseType={CaseType.SENTENCE_CASE}
text="Test Flag"
labelStyle={BadgeStyle.PRIMARY}
/>
</StorySection>
<StorySection title="Informational Style Flag">
<Flag
caseType={CaseType.SENTENCE_CASE}
text="Test Flag"
labelStyle={BadgeStyle.INFO}
/>
</StorySection>
<StorySection title="Success Style Flag">
<Flag
caseType={CaseType.SENTENCE_CASE}
text="Test Flag"
labelStyle={BadgeStyle.SUCCESS}
/>
</StorySection>
<StorySection title="Warning Style Flag">
<Flag
caseType={CaseType.SENTENCE_CASE}
text="Test Flag"
labelStyle={BadgeStyle.WARNING}
/>
</StorySection>
<StorySection title="Danger Style Flag">
<Flag
caseType={CaseType.SENTENCE_CASE}
text="Test Flag"
labelStyle={BadgeStyle.DANGER}
/>
</StorySection>
</>
));
......@@ -3,10 +3,10 @@
import * as React from 'react';
// TODO: Use css-modules instead of 'import'
import './styles.scss';
import { BadgeStyle } from 'config/config-types';
import './styles.scss';
export enum CaseType {
LOWER_CASE = 'lowerCase',
SENTENCE_CASE = 'sentenceCase',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment