feat: Sidebar + SidebarToggle, адаптивность компонентов (0.2.0)

This commit is contained in:
Тимур Городецкий
2026-08-14 10:35:42 +05:00
parent e65805379e
commit c72f93e359
38 changed files with 985 additions and 14 deletions
+32
View File
@@ -0,0 +1,32 @@
import type { Meta, StoryObj } from '@storybook/react-vite';
import { Icon } from './Icon';
import { ICON_NAMES } from './iconNames';
const meta: Meta<typeof Icon> = {
title: 'Основа/Icon',
component: Icon,
tags: ['autodocs'],
argTypes: {
name: { control: 'select', options: [...ICON_NAMES] },
size: { control: 'radio', options: ['sm', 'md', 'lg'] },
},
args: { name: 'send', size: 'md' },
};
export default meta;
type Story = StoryObj<typeof Icon>;
export const Single: Story = {};
export const AllIcons: Story = {
render: () => (
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(6, 1fr)', gap: 16 }}>
{ICON_NAMES.map((n) => (
<div key={n} style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 6, fontSize: 11 }}>
<Icon name={n} size="lg" />
<span>{n}</span>
</div>
))}
</div>
),
};
+3
View File
@@ -126,6 +126,9 @@ export const IconSprite: React.FC = () => (
<circle cx="11" cy="11" r="7" />
<path d="m21 21-4.35-4.35" />
</symbol>
<symbol id="i-menu" viewBox="0 0 24 24">
<path d="M4 6h16M4 12h16M4 18h16" />
</symbol>
<symbol id="i-warning" viewBox="0 0 24 24">
<path d="M12 2 1 21h22z" strokeLinejoin="round" />
<path d="M12 9v5M12 17h.01" />
+1
View File
@@ -29,6 +29,7 @@ export const ICON_NAMES = [
'chevron-left',
'arrow-left',
'search',
'menu',
'warning',
'check',
'plus'