docbrown/app/javascript/designSystem/__stories__/dropdowns.stories.jsx
Nick Taylor ccf7e6e5bf
Upgrade to webpacker/webpack 4 and Babel 7 (#6664)
Upgraded to webpacker 4/webpack 4 and Babel 7
2020-03-17 08:20:36 -04:00

47 lines
1.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { h } from 'preact';
import './designSystem.scss';
storiesOf('Components/HTML/Dropdowns', module)
.add('Description', () => (
<div className="container">
<h2>Dropdowns</h2>
<p>
Dropdowns should have position relative to its trigger. They can be
used for some 2nd level navigations, contextual configurations, etc...
</p>
<p>Dropdowns should not be bigger than 320px.</p>
<p>Dropdown default padding should be dependent on width:</p>
<ul>
<li>&lt;250px: 16px</li>
<li>251 - 320px: 24px</li>
</ul>
<p>
If you need to utilize entire dropdown area and you have to get rid of
default padding, please use modifier class
<code>crayons-dropdown--padding-0</code>.
</p>
<p>
FYI: Dropdowns use Box component as background, with Level 3
elevation.
</p>
</div>
))
.add('Default', () => (
<div className="crayons-dropdown">
Hey, I&apos;m a dropdown content! Lorem ipsum dolor sit amet, consectetur
adipisicing elit. Sequi ea voluptates quaerat eos consequuntur temporibus.
</div>
))
.add('Large', () => (
<div className="crayons-dropdown crayons-dropdown--l">
Hey, I&apos;m a dropdown content! Lorem ipsum dolor sit amet, consectetur
adipisicing elit. Sequi ea voluptates quaerat eos consequuntur temporibus.
</div>
))
.add('No Padding', () => (
<div className="crayons-dropdown crayons-dropdown--padding-0">
Hey, I&apos;m a dropdown content! Lorem ipsum dolor sit amet, consectetur
adipisicing elit. Sequi ea voluptates quaerat eos consequuntur temporibus.
</div>
));