generated from eea/volto-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bdf306
commit 1337e6f
Showing
3 changed files
with
131 additions
and
65 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
83 changes: 40 additions & 43 deletions
83
src/customizations/components/theme/Header/HeaderComponent.stories.js
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,52 +1,49 @@ | ||
import React from 'react'; | ||
import { Header, Icon } from 'semantic-ui-react'; | ||
import { Header, Container } from 'semantic-ui-react'; | ||
|
||
export default { | ||
title: 'Components/Header', | ||
component: Header, | ||
argTypes: { | ||
size: { | ||
control: { type: 'inline-radio' }, | ||
options: ['huge', 'large', 'medium', 'small', 'tiny'], | ||
}, | ||
textAlign: { | ||
control: { type: 'inline-radio' }, | ||
options: ['left', 'center', 'right', 'justified'], | ||
}, | ||
floated: { | ||
control: { type: 'inline-radio' }, | ||
options: [false, 'left', 'right'], | ||
}, | ||
}, | ||
}; | ||
|
||
function HeaderContent({ content, size, icon, textAlign }) { | ||
return ( | ||
<Header size={size} icon={icon} textAlign={textAlign}> | ||
{icon && <Icon name="users" circular />} | ||
<Header.Content>{content}</Header.Content> | ||
</Header> | ||
); | ||
} | ||
|
||
const Template = (args) => <HeaderContent {...args}></HeaderContent>; | ||
const Template = (args) => ( | ||
<Container> | ||
<h1>Heading 1</h1> | ||
<h1> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mattis arcu | ||
egestas ultrices mollis. | ||
</h1> | ||
<hr></hr> | ||
<h2>Heading 2</h2> | ||
<h2> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mattis arcu | ||
egestas ultrices mollis. | ||
</h2> | ||
<hr></hr> | ||
<h3>Heading 3</h3> | ||
<h3> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mattis arcu | ||
egestas ultrices mollis. | ||
</h3> | ||
<hr></hr> | ||
<h4>Heading 4</h4> | ||
<h4> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mattis arcu | ||
egestas ultrices mollis. | ||
</h4> | ||
<hr></hr> | ||
<h5>Heading 5</h5> | ||
<h5> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mattis arcu | ||
egestas ultrices mollis. | ||
</h5> | ||
<hr></hr> | ||
<h6>Heading 6</h6> | ||
<h6> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec mattis arcu | ||
egestas ultrices mollis. | ||
</h6> | ||
</Container> | ||
); | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { | ||
children: 'Default Header', | ||
}; | ||
|
||
export const Playground = Template.bind({}); | ||
Playground.args = { | ||
content: 'Playground Header', | ||
subheader: 'Subheader', | ||
size: 'medium', | ||
textAlign: 'left', | ||
dividing: false, | ||
color: 'black', | ||
floated: 'left', | ||
disabled: false, | ||
sub: false, | ||
block: false, | ||
attached: false, | ||
}; |
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