|
| 1 | +import './storybook-theme.css'; |
| 2 | +// FYI: import of antd styles required to show components based on it correctly |
| 3 | +import 'antd/dist/antd.css'; |
| 4 | + |
| 5 | +import { BADGE, defaultBadgesConfig } from '@geometricpanda/storybook-addon-badges'; |
| 6 | +import DocTemplate from './DocTemplate.mdx'; |
| 7 | + |
| 8 | +const preview = { |
| 9 | + tags: ['!dev', 'autodocs'], |
| 10 | + parameters: { |
| 11 | + previewTabs: { |
| 12 | + 'storybook/docs/panel': { index: -1 }, |
| 13 | + }, |
| 14 | + controls: { |
| 15 | + matchers: { |
| 16 | + color: /(background|color)$/i, |
| 17 | + date: /Date$/i, |
| 18 | + }, |
| 19 | + }, |
| 20 | + options: { |
| 21 | + storySort: { |
| 22 | + method: 'alphabetical', |
| 23 | + order: [ |
| 24 | + // Order of Docs Pages |
| 25 | + 'Introduction', |
| 26 | + 'Style Guide', |
| 27 | + 'Design Tokens', |
| 28 | + 'Style Utilities', |
| 29 | + 'Icons', |
| 30 | + |
| 31 | + // Order of Components |
| 32 | + 'Layout', |
| 33 | + 'Forms', |
| 34 | + 'Data Display', |
| 35 | + 'Feedback', |
| 36 | + 'Typography', |
| 37 | + 'Overlay', |
| 38 | + 'Disclosure', |
| 39 | + 'Navigation', |
| 40 | + 'Media', |
| 41 | + 'Other', |
| 42 | + ], |
| 43 | + locales: '', |
| 44 | + }, |
| 45 | + }, |
| 46 | + docs: { |
| 47 | + page: DocTemplate, |
| 48 | + toc: { |
| 49 | + disable: false, |
| 50 | + }, |
| 51 | + docs: { |
| 52 | + source: { |
| 53 | + format: true, |
| 54 | + }, |
| 55 | + }, |
| 56 | + }, |
| 57 | + |
| 58 | + // Reconfig the premade badges with better titles |
| 59 | + badgesConfig: { |
| 60 | + stable: { |
| 61 | + ...defaultBadgesConfig[BADGE.STABLE], |
| 62 | + title: 'Stable', |
| 63 | + tooltip: 'This component is stable but may have frequent changes. Use at own discretion.', |
| 64 | + }, |
| 65 | + productionReady: { |
| 66 | + ...defaultBadgesConfig[BADGE.STABLE], |
| 67 | + title: 'Production Ready', |
| 68 | + tooltip: 'This component is production ready and has been tested in a production environment.', |
| 69 | + }, |
| 70 | + WIP: { |
| 71 | + ...defaultBadgesConfig[BADGE.BETA], |
| 72 | + title: 'WIP', |
| 73 | + tooltip: 'This component is a work in progress and may not be fully functional or tested.', |
| 74 | + }, |
| 75 | + readyForDesignReview: { |
| 76 | + ...defaultBadgesConfig[BADGE.NEEDS_REVISION], |
| 77 | + title: 'Ready for Design Review', |
| 78 | + tooltip: 'This component is ready for design review and feedback.', |
| 79 | + }, |
| 80 | + }, |
| 81 | + }, |
| 82 | +}; |
| 83 | + |
| 84 | +export default preview; |
0 commit comments