Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amundsen_dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Surendar Reddy Mangannagari
amundsen_dev
Commits
3ce62cc3
Unverified
Commit
3ce62cc3
authored
Aug 28, 2020
by
Marcos Iglesias
Committed by
GitHub
Aug 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Completing storybook for Flag component (#622)
Signed-off-by:
Marcos Iglesias
<
miglesiasvalle@lyft.com
>
parent
537c1432
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
13 deletions
+61
-13
Flag.story.tsx
...plication/static/js/components/common/Flag/Flag.story.tsx
+59
-11
index.tsx
...en_application/static/js/components/common/Flag/index.tsx
+2
-2
No files found.
amundsen_application/static/js/components/common/Flag/Flag.story.tsx
View file @
3ce62cc3
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
>
</>
));
amundsen_application/static/js/components/common/Flag/index.tsx
View file @
3ce62cc3
...
...
@@ -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'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment