Skip to content

Commit

Permalink
🐛 fix: rename StroyBook with StoryBook
Browse files Browse the repository at this point in the history
  • Loading branch information
yingpengsha committed Oct 9, 2023
1 parent b27f3e5 commit 8dfba16
Show file tree
Hide file tree
Showing 33 changed files with 105 additions and 97 deletions.
6 changes: 3 additions & 3 deletions src/ActionIcon/demos/CustomSize.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ActionIcon, ActionIconProps, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { ActionIcon, ActionIconProps, StoryBook, useControls, useCreateStore } from '@lobehub/ui';
import { Settings } from 'lucide-react';

export default () => {
Expand Down Expand Up @@ -34,8 +34,8 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<ActionIcon active icon={Settings} size={size} />
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/ActionIcon/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ActionIcon, ActionIconProps, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { ActionIcon, ActionIconProps, StoryBook, useControls, useCreateStore } from '@lobehub/ui';
import { folder } from 'leva';
import * as LucideIcon from 'lucide-react';

Expand Down Expand Up @@ -44,8 +44,8 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<ActionIcon {...control} />
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/ActionIconGroup/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
ActionIconGroup,
ActionIconGroupProps,
StroyBook,
StoryBook,
useControls,
useCreateStore,
} from '@lobehub/ui';
Expand All @@ -26,13 +26,13 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<ActionIconGroup
dropdownMenu={dropdownMenu}
items={items}
onActionClick={(key) => console.log(key)}
{...control}
/>
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/Avatar/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ActionIconProps, Avatar, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { ActionIconProps, Avatar, StoryBook, useControls, useCreateStore } from '@lobehub/ui';

import { useCdnFn } from '@/ConfigProvider';

Expand Down Expand Up @@ -30,8 +30,8 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<Avatar {...control} />
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/ChatHeader/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChatHeader, ChatHeaderProps, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { ChatHeader, ChatHeaderProps, StoryBook, useControls, useCreateStore } from '@lobehub/ui';

export default () => {
const store = useCreateStore();
Expand All @@ -10,9 +10,9 @@ export default () => {
);

return (
<StroyBook levaStore={store} noPadding>
<StoryBook levaStore={store} noPadding>
<ChatHeader {...control} left={<div>Left</div>} right={<div>Right</div>} />
<div style={{ height: 100 }} />
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/ChatItem/demos/Alert.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChatItem, ChatItemProps, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { ChatItem, ChatItemProps, StoryBook, useControls, useCreateStore } from '@lobehub/ui';

import { avatar } from './data';

Expand All @@ -17,8 +17,8 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<ChatItem avatar={avatar} error={control} />
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/ChatItem/demos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ActionIconGroup,
ChatItem,
ChatItemProps,
StroyBook,
StoryBook,
useControls,
useCreateStore,
} from '@lobehub/ui';
Expand Down Expand Up @@ -37,7 +37,7 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<ChatItem
{...control}
actions={
Expand All @@ -57,6 +57,6 @@ export default () => {
editing={edit}
onEditingChange={setEdit}
/>
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/ChatList/demos/Group.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChatList, ChatListProps, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { ChatList, ChatListProps, StoryBook, useControls, useCreateStore } from '@lobehub/ui';

import { groupData } from './data';

Expand All @@ -16,13 +16,13 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<ChatList
data={groupData}
{...control}
onActionClick={(key) => console.log(key)}
style={{ width: '100%' }}
/>
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/ChatList/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ChatList, ChatListProps, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { ChatList, ChatListProps, StoryBook, useControls, useCreateStore } from '@lobehub/ui';

import { data } from './data';

Expand All @@ -16,13 +16,13 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<ChatList
data={data}
style={{ width: '100%' }}
{...control}
onActionClick={(key) => console.log(key)}
/>
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/DraggablePanel/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
DraggablePanel,
DraggablePanelProps,
StroyBook,
StoryBook,
useControls,
useCreateStore,
} from '@lobehub/ui';
Expand Down Expand Up @@ -48,7 +48,7 @@ export default () => {
);

return (
<StroyBook levaStore={store} noPadding>
<StoryBook levaStore={store} noPadding>
<View
style={['top', 'bottom'].includes(control.placement) ? { flexDirection: 'column' } : {}}
>
Expand All @@ -68,6 +68,6 @@ export default () => {
</>
)}
</View>
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/EditableMessage/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EditableMessage, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { EditableMessage, StoryBook, useControls, useCreateStore } from '@lobehub/ui';
import { button } from 'leva';
import { useState } from 'react';

Expand All @@ -22,14 +22,14 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<EditableMessage
editing={editing}
onEditingChange={setEdit}
onOpenChange={setOpenModal}
openModal={openModal}
value={content}
/>
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/FluentEmoji/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
FluentEmoji,
type FluentEmojiProps,
StroyBook,
StoryBook,
getEmoji,
getEmojiNameByCharacter,
useControls,
Expand All @@ -26,7 +26,7 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<Flexbox align={'center'} gap={8}>
<Flexbox gap={8} horizontal>
<FluentEmoji type={'anim'} {...control} />
Expand All @@ -38,6 +38,6 @@ export default () => {
</Flexbox>
<Button icon={getEmoji(control.emoji)}>{getEmojiNameByCharacter(control.emoji)}</Button>
</Flexbox>
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/GradientButton/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
GradientButton,
GradientButtonProps,
StroyBook,
StoryBook,
useControls,
useCreateStore,
} from '@lobehub/ui';
Expand All @@ -21,8 +21,8 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<GradientButton {...control} />
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/GridBackground/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
GridBackground,
GridBackgroundProps,
StroyBook,
StoryBook,
useControls,
useCreateStore,
} from '@lobehub/ui';
Expand Down Expand Up @@ -38,8 +38,8 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<GridBackground style={{ width: '100%' }} {...control} />
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/Highlighter/demos/FullFeatured.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Highlighter, HighlighterProps, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { Highlighter, HighlighterProps, StoryBook, useControls, useCreateStore } from '@lobehub/ui';

const code = `export default ({ children, className }: MarkdownProps) => {
const { styles } = useStyles();
Expand Down Expand Up @@ -32,8 +32,8 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<Highlighter fullFeatured {...options} />
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/Highlighter/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Highlighter, HighlighterProps, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { Highlighter, HighlighterProps, StoryBook, useControls, useCreateStore } from '@lobehub/ui';

const code = `export default ({ children, className }: MarkdownProps) => {
const { styles } = useStyles();
Expand Down Expand Up @@ -32,8 +32,8 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<Highlighter {...options} />
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/Icon/demos/CustomSize.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Icon, IconProps, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { Icon, IconProps, StoryBook, useControls, useCreateStore } from '@lobehub/ui';
import { Settings } from 'lucide-react';

export default () => {
Expand All @@ -22,8 +22,8 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<Icon icon={Settings} size={size} />
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/Icon/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Icon, IconProps, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { Icon, IconProps, StoryBook, useControls, useCreateStore } from '@lobehub/ui';
import * as LucideIcon from 'lucide-react';

export default () => {
Expand All @@ -19,8 +19,8 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<Icon {...control} />
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/Input/demos/TextArea.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StroyBook, TextArea, TextAreaProps, useControls, useCreateStore } from '@lobehub/ui';
import { StoryBook, TextArea, TextAreaProps, useControls, useCreateStore } from '@lobehub/ui';

export default () => {
const store = useCreateStore();
Expand All @@ -14,8 +14,8 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<TextArea {...controls} />
</StroyBook>
</StoryBook>
);
};
6 changes: 3 additions & 3 deletions src/Input/demos/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Input, InputProps, StroyBook, useControls, useCreateStore } from '@lobehub/ui';
import { Input, InputProps, StoryBook, useControls, useCreateStore } from '@lobehub/ui';

export default () => {
const store = useCreateStore();
Expand All @@ -14,8 +14,8 @@ export default () => {
);

return (
<StroyBook levaStore={store}>
<StoryBook levaStore={store}>
<Input {...controls} />
</StroyBook>
</StoryBook>
);
};
Loading

0 comments on commit 8dfba16

Please sign in to comment.