Update storybook directory

This commit is contained in:
Nate Kelley 2025-02-27 08:40:07 -07:00
parent 9f1c75dc5d
commit 9c0c196ebf
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
35 changed files with 39 additions and 37 deletions

View File

@ -32,7 +32,7 @@ features/
- Handle their own state management when necessary - Handle their own state management when necessary
- Be fully typed using TypeScript - Be fully typed using TypeScript
- Include proper documentation and props interface - Include proper documentation and props interface
- Have a corresponding Storybook story showcasing different states and variations - Have a corresponding Storybook story showcasing different states and variations (The storybook should be titled Features/{feature_name})
2. Components should be: 2. Components should be:
- Reusable across different parts of the application - Reusable across different parts of the application
@ -45,9 +45,11 @@ features/
// features/PaginatedTable/PaginatedTable.tsx // features/PaginatedTable/PaginatedTable.tsx
import { Table, Pagination } from '../ui'; import { Table, Pagination } from '../ui';
export const PaginatedTable: React.FC<PaginatedTableProps> = (props) => { export const PaginatedTable: React.FC<PaginatedTableProps> = React.memo((props) => {
// Implementation // Implementation
}; });
PaginatedTable.displayName = 'PaginatedTable';
``` ```
## Best Practices ## Best Practices

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { Avatar } from './Avatar'; import { Avatar } from './Avatar';
const meta = { const meta = {
title: 'Base/Avatar', title: 'UI/Avatar',
component: Avatar, component: Avatar,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -3,7 +3,7 @@ import { Breadcrumb } from './Breadcrumb';
import { BusterAppRoutes } from '@/routes/busterRoutes/busterAppRoutes'; import { BusterAppRoutes } from '@/routes/busterRoutes/busterAppRoutes';
const meta: Meta<typeof Breadcrumb> = { const meta: Meta<typeof Breadcrumb> = {
title: 'Base/Breadcrumb', title: 'UI/Breadcrumb',
component: Breadcrumb, component: Breadcrumb,
tags: ['autodocs'], tags: ['autodocs'],
parameters: { parameters: {

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { BackButton } from './BackButton'; import { BackButton } from './BackButton';
const meta: Meta<typeof BackButton> = { const meta: Meta<typeof BackButton> = {
title: 'Base/Buttons/BackButton', title: 'UI/Buttons/BackButton',
component: BackButton, component: BackButton,
tags: ['autodocs'], tags: ['autodocs'],
argTypes: { argTypes: {

View File

@ -7,7 +7,7 @@ const IconSelect = Object.keys(OutlinedIcons).map((icon) => {
}); });
const meta: Meta<typeof Button> = { const meta: Meta<typeof Button> = {
title: 'Base/Buttons/Button', title: 'UI/Buttons/Button',
component: Button, component: Button,
tags: ['autodocs'], tags: ['autodocs'],
args: { args: {

View File

@ -3,7 +3,7 @@ import { ButtonDropdown } from './ButtonDropdown';
import { PaintRoller } from '../icons/NucleoIconOutlined'; import { PaintRoller } from '../icons/NucleoIconOutlined';
const meta: Meta<typeof ButtonDropdown> = { const meta: Meta<typeof ButtonDropdown> = {
title: 'Base/Buttons/Button Dropdown', title: 'UI/Buttons/Button Dropdown',
component: ButtonDropdown, component: ButtonDropdown,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './CardBase'; import { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './CardBase';
const meta = { const meta = {
title: 'Base/Cards/Card', title: 'UI/Cards/Card',
component: Card, component: Card,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { CodeCard } from './CodeCard'; import { CodeCard } from './CodeCard';
const meta: Meta<typeof CodeCard> = { const meta: Meta<typeof CodeCard> = {
title: 'Base/Cards/CodeCard', title: 'UI/Cards/CodeCard',
component: CodeCard, component: CodeCard,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -4,7 +4,7 @@ import { BellOutlined } from '@ant-design/icons';
import { faker } from '@faker-js/faker'; import { faker } from '@faker-js/faker';
const meta: Meta<typeof InfoCard> = { const meta: Meta<typeof InfoCard> = {
title: 'Base/Cards/InfoCard', title: 'UI/Cards/InfoCard',
component: InfoCard, component: InfoCard,
tags: ['autodocs'], tags: ['autodocs'],
args: { args: {

View File

@ -3,7 +3,7 @@ import { BusterChartLegend } from '../BusterChartLegend';
import { ChartType } from '../../interfaces'; import { ChartType } from '../../interfaces';
const meta: Meta<typeof BusterChartLegend> = { const meta: Meta<typeof BusterChartLegend> = {
title: 'Base/Charts/BusterChartLegend', title: 'UI/Charts/BusterChartLegend',
component: BusterChartLegend, component: BusterChartLegend,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -3,7 +3,7 @@ import { LegendItemDot } from '../LegendDot';
import { ChartType } from '../../interfaces'; import { ChartType } from '../../interfaces';
const meta = { const meta = {
title: 'Base/Charts/LegendDot', title: 'UI/Charts/LegendDot',
component: LegendItemDot, component: LegendItemDot,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -3,7 +3,7 @@ import { LegendItem } from '../LegendItem';
import { ChartType } from '../../interfaces'; import { ChartType } from '../../interfaces';
const meta = { const meta = {
title: 'Base/Charts/LegendItem', title: 'UI/Charts/LegendItem',
component: LegendItem, component: LegendItem,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -3,7 +3,7 @@ import { OverflowButton } from '../OverflowContainer';
import { ChartType } from '../../interfaces'; import { ChartType } from '../../interfaces';
const meta = { const meta = {
title: 'Base/Charts/OverflowButton', title: 'UI/Charts/OverflowButton',
component: OverflowButton, component: OverflowButton,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { BusterChartTooltip } from './BusterChartTooltip'; import { BusterChartTooltip } from './BusterChartTooltip';
const meta: Meta<typeof BusterChartTooltip> = { const meta: Meta<typeof BusterChartTooltip> = {
title: 'Base/Charts/BusterChartTooltip', title: 'UI/Charts/BusterChartTooltip',
component: BusterChartTooltip, component: BusterChartTooltip,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { Checkbox } from './Checkbox'; import { Checkbox } from './Checkbox';
const meta: Meta<typeof Checkbox> = { const meta: Meta<typeof Checkbox> = {
title: 'Base/Inputs/Checkbox', title: 'UI/Inputs/Checkbox',
component: Checkbox, component: Checkbox,
tags: ['autodocs'], tags: ['autodocs'],
argTypes: { argTypes: {

View File

@ -6,7 +6,7 @@ import { faker } from '@faker-js/faker';
import React from 'react'; import React from 'react';
const meta: Meta<typeof Dropdown> = { const meta: Meta<typeof Dropdown> = {
title: 'Base/Dropdowns/Dropdown', title: 'UI/Dropdowns/Dropdown',
component: Dropdown, component: Dropdown,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -3,7 +3,7 @@ import { SearchDropdown } from './SearchDropdown';
import { User, MapSettings, Mailbox } from '../icons'; import { User, MapSettings, Mailbox } from '../icons';
const meta: Meta<typeof SearchDropdown> = { const meta: Meta<typeof SearchDropdown> = {
title: 'Base/Dropdowns/SearchDropdown', title: 'UI/Dropdowns/SearchDropdown',
component: SearchDropdown, component: SearchDropdown,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { GlobalErrorComponent } from './GlobalErrorComponent'; import { GlobalErrorComponent } from './GlobalErrorComponent';
const meta: Meta<typeof GlobalErrorComponent> = { const meta: Meta<typeof GlobalErrorComponent> = {
title: 'Base/Error/GlobalErrorComponent', title: 'UI/Error/GlobalErrorComponent',
component: GlobalErrorComponent, component: GlobalErrorComponent,
parameters: { parameters: {
layout: 'fullscreen' layout: 'fullscreen'

View File

@ -9,7 +9,7 @@ import { Hand } from '../icons';
import { cn } from '@/lib/classMerge'; import { cn } from '@/lib/classMerge';
const meta: Meta<typeof BusterResizeableGrid> = { const meta: Meta<typeof BusterResizeableGrid> = {
title: 'Base/Grid/BusterResizeableGrid', title: 'UI/Grid/BusterResizeableGrid',
component: BusterResizeableGrid, component: BusterResizeableGrid,
parameters: { parameters: {
layout: 'padded' layout: 'padded'

View File

@ -3,7 +3,7 @@ import { AppDataSourceIcon } from './AppDataSourceIcons';
import { DataSourceTypes } from '@/api/asset_interfaces'; import { DataSourceTypes } from '@/api/asset_interfaces';
const meta: Meta<typeof AppDataSourceIcon> = { const meta: Meta<typeof AppDataSourceIcon> = {
title: 'Base/Icons/DataSourceIcon', title: 'UI/Icons/DataSourceIcon',
component: AppDataSourceIcon, component: AppDataSourceIcon,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { StatusIndicator } from './StatusIndicator'; import { StatusIndicator } from './StatusIndicator';
const meta = { const meta = {
title: 'Base/StatusIndicator', title: 'UI/StatusIndicator',
component: StatusIndicator, component: StatusIndicator,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { AppCodeEditor } from './AppCodeEditor'; import { AppCodeEditor } from './AppCodeEditor';
const meta: Meta<typeof AppCodeEditor> = { const meta: Meta<typeof AppCodeEditor> = {
title: 'Base/Inputs/AppCodeEditor', title: 'UI/Inputs/AppCodeEditor',
component: AppCodeEditor, component: AppCodeEditor,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { Input } from './Input'; import { Input } from './Input';
const meta: Meta<typeof Input> = { const meta: Meta<typeof Input> = {
title: 'Base/Inputs/Input', title: 'UI/Inputs/Input',
component: Input, component: Input,
tags: ['autodocs'], tags: ['autodocs'],
argTypes: { argTypes: {

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { InputTextArea } from './InputTextArea'; import { InputTextArea } from './InputTextArea';
const meta: Meta<typeof InputTextArea> = { const meta: Meta<typeof InputTextArea> = {
title: 'Base/Inputs/InputTextArea', title: 'UI/Inputs/InputTextArea',
component: InputTextArea, component: InputTextArea,
tags: ['autodocs'], tags: ['autodocs'],
args: { args: {

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { InputTextAreaButton } from './InputTextAreaButton'; import { InputTextAreaButton } from './InputTextAreaButton';
const meta: Meta<typeof InputTextAreaButton> = { const meta: Meta<typeof InputTextAreaButton> = {
title: 'Base/Inputs/InputTextAreaButton', title: 'UI/Inputs/InputTextAreaButton',
component: InputTextAreaButton, component: InputTextAreaButton,
tags: ['autodocs'], tags: ['autodocs'],
args: {}, args: {},

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { AppSplitter } from './AppSplitter'; import { AppSplitter } from './AppSplitter';
const meta = { const meta = {
title: 'Base/Layouts/AppSplitter', title: 'UI/Layouts/AppSplitter',
component: AppSplitter, component: AppSplitter,
parameters: { parameters: {
layout: 'fullscreen' layout: 'fullscreen'

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { AppVerticalSplitterWithGap } from './AppVerticalSplitterWithGap'; import { AppVerticalSplitterWithGap } from './AppVerticalSplitterWithGap';
const meta: Meta<typeof AppVerticalSplitterWithGap> = { const meta: Meta<typeof AppVerticalSplitterWithGap> = {
title: 'Base/Layouts/AppVerticalSplitterWithGap', title: 'UI/Layouts/AppVerticalSplitterWithGap',
component: AppVerticalSplitterWithGap, component: AppVerticalSplitterWithGap,
parameters: { parameters: {
layout: 'fullscreen' layout: 'fullscreen'

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { KeyboardShortcutPill } from './KeyboardShortcutPills'; import { KeyboardShortcutPill } from './KeyboardShortcutPills';
const meta: Meta<typeof KeyboardShortcutPill> = { const meta: Meta<typeof KeyboardShortcutPill> = {
title: 'Base/Pills/KeyboardShortcutPill', title: 'UI/Pills/KeyboardShortcutPill',
component: KeyboardShortcutPill, component: KeyboardShortcutPill,
tags: ['autodocs'] tags: ['autodocs']
}; };

View File

@ -3,7 +3,7 @@ import { Segmented } from './Segmented';
import { BottleChampagne, Grid, HouseModern, PaintRoller } from '../icons'; import { BottleChampagne, Grid, HouseModern, PaintRoller } from '../icons';
const meta: Meta<typeof Segmented> = { const meta: Meta<typeof Segmented> = {
title: 'Base/Segmented', title: 'UI/Segmented',
component: Segmented, component: Segmented,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -3,7 +3,7 @@ import { Select } from './Select';
import { User, MapSettings, Mailbox } from '../icons'; import { User, MapSettings, Mailbox } from '../icons';
const meta: Meta<typeof Select> = { const meta: Meta<typeof Select> = {
title: 'Base/Select/Select', title: 'UI/Select/Select',
component: Select, component: Select,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -4,7 +4,7 @@ import { useState } from 'react';
import { type SelectItem } from './Select'; import { type SelectItem } from './Select';
const meta = { const meta = {
title: 'Base/Select/SelectTagInput', title: 'UI/Select/SelectTagInput',
component: SelectTagInput, component: SelectTagInput,
parameters: { parameters: {
layout: 'centered' layout: 'centered'

View File

@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { AppSwitch } from './AppSwitch'; import { AppSwitch } from './AppSwitch';
const meta: Meta<typeof AppSwitch> = { const meta: Meta<typeof AppSwitch> = {
title: 'Base/Inputs/Switch', title: 'UI/Inputs/Switch',
component: AppSwitch, component: AppSwitch,
tags: ['autodocs'], tags: ['autodocs'],
argTypes: { argTypes: {

View File

@ -70,7 +70,7 @@ const TestComponent = ({
}; };
const meta: Meta<typeof TestComponent> = { const meta: Meta<typeof TestComponent> = {
title: 'Base/Toast', title: 'UI/Toast',
component: TestComponent, component: TestComponent,
tags: ['autodocs'], tags: ['autodocs'],
argTypes: { argTypes: {

View File

@ -3,7 +3,7 @@ import { Popover } from './Popover';
import { Button } from '../buttons/Button'; import { Button } from '../buttons/Button';
const meta = { const meta = {
title: 'Base/Tooltip/Popover', title: 'UI/Tooltip/Popover',
component: Popover, component: Popover,
tags: ['autodocs'], tags: ['autodocs'],
parameters: { parameters: {

View File

@ -3,7 +3,7 @@ import { Button } from '../buttons/Button';
import { Tooltip } from './Tooltip'; import { Tooltip } from './Tooltip';
const meta = { const meta = {
title: 'Base/Tooltip', title: 'UI/Tooltip',
component: Tooltip, component: Tooltip,
parameters: { parameters: {
layout: 'centered' layout: 'centered'