-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: storybook build (DX-1551) (#116)
Co-authored-by: Tyler Han <tylerhan97@gmail.com>
- Loading branch information
1 parent
f6af2e9
commit dbf9e63
Showing
38 changed files
with
4,869 additions
and
7,812 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,5 @@ nyc_coverage* | |
.turbo | ||
|
||
.env.* | ||
|
||
build-storybook.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ | |
"husky", | ||
"lint-staged", | ||
"slate", | ||
"zod" | ||
"zod", | ||
"chromatic" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
|
||
<script> | ||
window.global = window; | ||
__USE_SHADOW_ROOT__ = false; | ||
</script> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Preview } from '@storybook/react'; | ||
import React from 'react'; | ||
|
||
import { RuntimeProvider } from '../src/contexts/RuntimeContext/index'; | ||
|
||
const MOCK_CONFIG = { render: { mode: 'embedded' }, verify: { projectID: ' ' } } as any; | ||
const MOCK_ASSISTANT = { persistence: {}, extensions: [] } as any; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}, | ||
decorators: [ | ||
(Story) => ( | ||
<RuntimeProvider config={MOCK_CONFIG} assistant={MOCK_ASSISTANT}> | ||
<Story /> | ||
</RuntimeProvider> | ||
), | ||
], | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"outputDir": "./storybook-static" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
export { ReactComponent as close } from './close.svg'; | ||
export { ReactComponent as closeV2 } from './closeV2.svg'; | ||
export { ReactComponent as largeArrowLeft } from './large-arrow-left.svg'; | ||
export { ReactComponent as minus } from './minus.svg'; | ||
export { ReactComponent as smallArrowUp } from './small-arrow-up.svg'; | ||
export { ReactComponent as thumbsUp } from './thumbs-up.svg'; | ||
export { ReactComponent as topCaret } from './top-caret.svg'; | ||
export { default as close } from './close.svg?react'; | ||
export { default as closeV2 } from './closeV2.svg?react'; | ||
export { default as largeArrowLeft } from './large-arrow-left.svg?react'; | ||
export { default as minus } from './minus.svg?react'; | ||
export { default as smallArrowUp } from './small-arrow-up.svg?react'; | ||
export { default as thumbsUp } from './thumbs-up.svg?react'; | ||
export { default as topCaret } from './top-caret.svg?react'; |
24 changes: 14 additions & 10 deletions
24
packages/react-chat/src/components/AssistantInfo/AssistantInfo.story.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
import { ComponentMeta, ComponentStory } from '@storybook/react'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import Chat from '@/components/Chat'; | ||
import { VF_ICON } from '@/fixtures'; | ||
|
||
import AssistantInfo from '.'; | ||
import AssistantInfo, { AssistantInfoProps } from '.'; | ||
|
||
export default { | ||
type Story = StoryObj<typeof AssistantInfo>; | ||
|
||
const meta: Meta<typeof AssistantInfo> = { | ||
title: 'Components/Chat/AssistantInfo', | ||
component: AssistantInfo, | ||
args: { | ||
title: 'Assistant Name', | ||
description: "Voiceflow's virtual assistant is here to help.", | ||
avatar: VF_ICON, | ||
}, | ||
} as ComponentMeta<typeof AssistantInfo>; | ||
}; | ||
|
||
const Template: ComponentStory<typeof AssistantInfo> = (args) => ( | ||
<Chat.Container> | ||
<AssistantInfo {...args} /> | ||
</Chat.Container> | ||
); | ||
export default meta; | ||
|
||
export const Default = Template.bind({}); | ||
export const Default: Story = { | ||
render: (args: AssistantInfoProps) => ( | ||
<Chat.Container> | ||
<AssistantInfo {...args} /> | ||
</Chat.Container> | ||
), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.