* Renabled building Storybook. * Explicitly added webpack style loaders for Storybook custom webpack config. * Upgraded Storybook configuration. * Added mixin/function to handle SASS compilation for Sprockets and Storybook's webpack. * Readded stylesheets/js required for crayons to run. * Added a custom title to Storybook. * Fixed custom Storybook CSS. * Migrated Search storybook stories. * Migrated crayons' box stories. * Migrated crayons' modal stories. * Migrated crayons' button stories. * Changed title a bit until we get a logo. * Migrated crayons' notice stories. * Migrated crayons' dropdown stories. * Migrated crayons' indicator stories. * Migrated crayons' typography stories. * Migrated crayons' form element stories. * Migrated crayons' navigation stories. * Migrated crayons' avatar & logo stories. * Migrated fatured article stories. * Migrated article loading stories. * Migrated today's podcast episodes stories. * Migrated podcast episode stories. * Migrated rest of article stories. * Update app/javascript/.storybook/manager.js Co-Authored-By: rhymes <rhymesete@gmail.com> * Commented new SASS function and mixin. Co-authored-by: rhymes <rhymesete@gmail.com>
69 lines
1.8 KiB
JavaScript
69 lines
1.8 KiB
JavaScript
import { h } from 'preact';
|
||
|
||
import './designSystem.scss';
|
||
|
||
export default {
|
||
title: 'Components/HTML/Dropdowns',
|
||
};
|
||
|
||
export const Description = () => (
|
||
<div className="container">
|
||
<h2>Dropdowns</h2>
|
||
<p>
|
||
Dropdowns should have position relative to it’s 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><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>
|
||
);
|
||
|
||
Description.story = {
|
||
name: 'description',
|
||
};
|
||
|
||
export const Default = () => (
|
||
<div className="crayons-dropdown">
|
||
Hey, I'm a dropdown content! Lorem ipsum dolor sit amet, consectetur
|
||
adipisicing elit. Sequi ea voluptates quaerat eos consequuntur temporibus.
|
||
</div>
|
||
);
|
||
|
||
Default.story = {
|
||
name: 'default',
|
||
};
|
||
|
||
export const Large = () => (
|
||
<div className="crayons-dropdown crayons-dropdown--l">
|
||
Hey, I'm a dropdown content! Lorem ipsum dolor sit amet, consectetur
|
||
adipisicing elit. Sequi ea voluptates quaerat eos consequuntur temporibus.
|
||
</div>
|
||
);
|
||
|
||
Large.story = {
|
||
name: 'large',
|
||
};
|
||
|
||
export const NoPadding = () => (
|
||
<div className="crayons-dropdown crayons-dropdown--padding-0">
|
||
Hey, I'm a dropdown content! Lorem ipsum dolor sit amet, consectetur
|
||
adipisicing elit. Sequi ea voluptates quaerat eos consequuntur temporibus.
|
||
</div>
|
||
);
|
||
|
||
NoPadding.story = {
|
||
name: 'no paddding',
|
||
};
|