feat: Sidebar + SidebarToggle, адаптивность компонентов (0.2.0)
This commit is contained in:
+19
-11
@@ -1,21 +1,29 @@
|
||||
import type { Preview } from '@storybook/react-vite'
|
||||
import type { Preview } from '@storybook/react-vite';
|
||||
import * as React from 'react';
|
||||
import { IconSprite } from '../src/Icon/IconSprite';
|
||||
|
||||
const preview: Preview = {
|
||||
parameters: {
|
||||
controls: {
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i,
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i,
|
||||
},
|
||||
},
|
||||
|
||||
a11y: {
|
||||
// 'todo' - show a11y violations in the test UI only
|
||||
// 'error' - fail CI on a11y violations
|
||||
// 'off' - skip a11y checks entirely
|
||||
test: 'todo'
|
||||
}
|
||||
a11y: { test: 'todo' },
|
||||
},
|
||||
// Спрайт иконок монтируется один раз для ВСЕХ историй — иначе <Icon> пустой.
|
||||
// Плюс общий отступ и шрифт Inter, как в боевом портале.
|
||||
decorators: [
|
||||
(Story) => (
|
||||
<>
|
||||
<IconSprite />
|
||||
<div style={{ padding: 16, fontFamily: "'Inter', -apple-system, 'Segoe UI', sans-serif" }}>
|
||||
<Story />
|
||||
</div>
|
||||
</>
|
||||
),
|
||||
],
|
||||
};
|
||||
|
||||
export default preview;
|
||||
export default preview;
|
||||
|
||||
Reference in New Issue
Block a user