import hbs from 'htmlbars-inline-precompile';
import { withKnobs, optionsKnob } from '@storybook/addon-knobs';
export default {
title: 'Components/Boxed Section',
decorators: [withKnobs],
};
export let Standard = () => {
return {
template: hbs`
Boxed section
`,
context: contextFactory(),
};
};
export let RightHandDetails = () => {
return {
template: hbs`
Boxed section with right hand details
Boxed Section With Right Hand Details
{{now interval=1000}}
`,
context: contextFactory(),
};
};
export let TitleDecoration = () => {
return {
template: hbs`
Boxed section with title decoration
Boxed Section With Title Decoration
7
`,
context: contextFactory(),
};
};
export let Foot = () => {
return {
template: hbs`
Boxed section with foot
Boxed Section With Large Header
`,
context: contextFactory(),
};
};
export let LargeHeader = () => {
return {
template: hbs`
Boxed section with large header
Boxed Section With Large Header
Status
A tag that goes on a second line because it's rather long
`,
context: contextFactory(),
};
};
export let DarkBody = () => {
return {
template: hbs`
Boxed section with dark body
Boxed Section With Dark Body
`,
context: contextFactory(),
};
};
function contextFactory() {
return {
variant: optionsKnob(
'Variant',
{
Normal: '',
Info: 'is-info',
Warning: 'is-warning',
Danger: 'is-danger',
},
'',
{
display: 'inline-radio',
},
'variant-id'
),
};
}