component folders
This commit is contained in:
parent
8b64cc4529
commit
aaaa257276
41 changed files with 45 additions and 42 deletions
|
|
@ -27,6 +27,7 @@ export const parameters = {
|
|||
options: {
|
||||
// https://storybook.js.org/docs/svelte/writing-stories/naming-components-and-hierarchy#sorting-stories
|
||||
storySort: {
|
||||
method: 'alphabetical-by-kind',
|
||||
includeNames: true,
|
||||
order: [
|
||||
'Intro',
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
import { withComponentDocs } from './../../docs/utils/withParams';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/InlineAd',
|
||||
title: 'Components/Ads & analytics/InlineAd',
|
||||
component: InlineAd,
|
||||
...withComponentDocs(adDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
import { withComponentDocs } from './../../docs/utils/withParams';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/LeaderboardAd',
|
||||
title: 'Components/Ads & analytics/LeaderboardAd',
|
||||
component: LeaderboardAd,
|
||||
...withComponentDocs(adDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
import { withComponentDocs } from './../../docs/utils/withParams';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/SponsorshipAd',
|
||||
title: 'Components/Ads & analytics/SponsorshipAd',
|
||||
component: SponsorshipAd,
|
||||
...withComponentDocs(adDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Analytics',
|
||||
title: 'Components/Ads & analytics/Analytics',
|
||||
component: Analytics,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Article',
|
||||
title: 'Components/Page Layout/Article',
|
||||
component: Article,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/BeforeAfter',
|
||||
title: 'Components/Graphics/BeforeAfter',
|
||||
component: BeforeAfter,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Block',
|
||||
title: 'Components/Page layout/Block',
|
||||
component: Block,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
import { withComponentDocs } from '$docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/BodyText',
|
||||
title: 'Components/Text elements/BodyText',
|
||||
component: BodyText,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
import { withComponentDocs } from '$docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Byline',
|
||||
title: 'Components/Text elements/Byline',
|
||||
component: Byline,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
} from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/DatawrapperChart',
|
||||
title: 'Components/Graphics/DatawrapperChart',
|
||||
component: DatawrapperChart,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/DocumentCloud',
|
||||
title: 'Components/Multimedia/DocumentCloud',
|
||||
component: DocumentCloud,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/EmbedPreviewerLink',
|
||||
title: 'Components/Utilities/EmbedPreviewerLink',
|
||||
component: EmbedPreviewerLink,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/EndNotes',
|
||||
title: 'Components/Text elements/EndNotes',
|
||||
component: EndNotes,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
} from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/FeaturePhoto',
|
||||
title: 'Components/Multimedia/FeaturePhoto',
|
||||
component: FeaturePhoto,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Framer',
|
||||
title: 'Components/Utilities/Framer',
|
||||
component: Framer,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/GraphicBlock',
|
||||
title: 'Components/Graphics/GraphicBlock',
|
||||
component: GraphicBlock,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
} from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Headline',
|
||||
title: 'Components/Text elements/Headline',
|
||||
component: Headline,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
} from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/HeroHeadline',
|
||||
title: 'Components/Text elements/HeroHeadline',
|
||||
component: HeroHeadline,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/InfoBox',
|
||||
title: 'Components/Text elements/InfoBox',
|
||||
component: InfoBox,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Markdown',
|
||||
title: 'Components/Text elements/Markdown',
|
||||
component: Markdown,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/PaddingReset',
|
||||
title: 'Components/Page layout/PaddingReset',
|
||||
component: PaddingReset,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/PhotoCarousel',
|
||||
title: 'Components/Multimedia/PhotoCarousel',
|
||||
component: PhotoCarousel,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/PhotoPack',
|
||||
title: 'Components/Multimedia/PhotoPack',
|
||||
component: PhotoPack,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/PymChild',
|
||||
title: 'Components/Utilities/PymChild',
|
||||
component: PymChild,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/ReferralBlock',
|
||||
title: 'Components/Page furniture/ReferralBlock',
|
||||
component: ReferralBlock,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/ReutersGraphicsLogo',
|
||||
title: 'Components/Logos/ReutersGraphicsLogo',
|
||||
component: ReutersGraphicsLogo,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/ReutersLogo',
|
||||
title: 'Components/Logos/ReutersLogo',
|
||||
component: ReutersLogo,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
} from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/SEO',
|
||||
title: 'Components/Ads & analytics/SEO',
|
||||
component: SEO,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
} from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Scroller',
|
||||
title: 'Components/Graphics/Scroller',
|
||||
component: Scroller,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/SearchInput',
|
||||
title: 'Components/Controls/SearchInput',
|
||||
component: SearchInput,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/SimpleTimeline',
|
||||
title: 'Components/Text elements/SimpleTimeline',
|
||||
component: SimpleTimeline,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
} from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/SiteFooter',
|
||||
title: 'Components/Page furniture/SiteFooter',
|
||||
component: SiteFooter,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
} from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/SiteHeader',
|
||||
title: 'Components/Page furniture/SiteHeader',
|
||||
component: SiteHeader,
|
||||
...withComponentDocs(componentDocs),
|
||||
argsTypes: {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
import componentDocs from './stories/docs/component.md?raw';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/SiteHeadline',
|
||||
title: 'Components/Text elements/SiteHeadline',
|
||||
component: SiteHeadline,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Spinner',
|
||||
title: 'Components/Utilities/Spinner',
|
||||
component: Spinner,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
import { withComponentDocs, withStoryDocs } from '$docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Table',
|
||||
title: 'Components/Text elements/Table',
|
||||
component: Table,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
@ -37,12 +37,14 @@
|
|||
};
|
||||
</script>
|
||||
|
||||
<script>
|
||||
<script lang="ts">
|
||||
import { Template, Story } from '@storybook/addon-svelte-csf';
|
||||
|
||||
import pressFreedom from './stories/pressFreedom.json';
|
||||
import homeRuns from './stories/homeRuns.json';
|
||||
import richestWomen from './stories/richestWomen.json';
|
||||
|
||||
const currencyFormat = (v: number) => '$' + v.toFixed(1);
|
||||
</script>
|
||||
|
||||
<Template let:args>
|
||||
|
|
@ -154,7 +156,7 @@
|
|||
sortable: true,
|
||||
sortField: 'Net worth (in billions)',
|
||||
sortDirection: 'descending',
|
||||
fieldFormatters: { 'Net worth (in billions)': (v) => '$' + v.toFixed(1) },
|
||||
fieldFormatters: { 'Net worth (in billions)': currencyFormat },
|
||||
}}"
|
||||
/>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
} from '../../docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Theme',
|
||||
title: 'Components/Theming/Theme',
|
||||
component: Theme,
|
||||
...withComponentDocs(componentDocs),
|
||||
argTypes: {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/ToolsHeader',
|
||||
title: 'Components/Page furniture/ToolsHeader',
|
||||
component: ToolsHeader,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
} from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Video',
|
||||
title: 'Components/Multimedia/Video',
|
||||
component: Video,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
import { withSource, withComponentDocs } from '$lib/docs/utils/withParams.js';
|
||||
|
||||
export const meta = {
|
||||
title: 'Components/Visible',
|
||||
title: 'Components/Utilities/Visible',
|
||||
component: Visible,
|
||||
...withComponentDocs(componentDocs),
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue