-
-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrated SuccessStory files to .tsx and updated snapshot
- Loading branch information
1 parent
3190c8b
commit 2c43de5
Showing
6 changed files
with
48 additions
and
36 deletions.
There are no files selected for viewing
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,26 @@ | ||
import FlatCard from 'components/Cards/FlatCard/FlatCard'; | ||
|
||
export type SuccessStoryPropsType = { | ||
/** | ||
* Path to image used on the card. | ||
*/ | ||
imageSource: string; | ||
/** | ||
* String applied tot he block quote element. | ||
*/ | ||
quote: string; | ||
/** | ||
* String applied to the card header. | ||
*/ | ||
title: string; | ||
}; | ||
|
||
function SuccessStory({ imageSource, quote, title }: SuccessStoryPropsType) { | ||
return ( | ||
<FlatCard header={title} image={{ source: imageSource, alt: '' }}> | ||
<blockquote>{`"${quote}"`}</blockquote> | ||
</FlatCard> | ||
); | ||
} | ||
|
||
export default SuccessStory; |
17 changes: 0 additions & 17 deletions
17
components/SuccessStory/__stories__/SuccessStory.stories.js
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
components/SuccessStory/__stories__/SuccessStory.stories.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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import { descriptions } from 'common/constants/descriptions'; | ||
import { s3 } from 'common/constants/urls'; | ||
import SuccessStory from '../SuccessStory'; | ||
|
||
type SuccessStoryType = StoryObj<typeof SuccessStory>; | ||
|
||
const meta: Meta<typeof SuccessStory> = { | ||
title: 'SuccesStory', | ||
component: SuccessStory, | ||
args: { | ||
title: 'Name of Person', | ||
imageSource: `${s3}headshots/david_molina.jpg`, | ||
quote: descriptions.long, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Default: SuccessStoryType = { | ||
render: args => <SuccessStory {...args} />, | ||
}; |
1 change: 0 additions & 1 deletion
1
...ccessStory/__tests__/SuccessStory.test.js → ...cessStory/__tests__/SuccessStory.test.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
File renamed without changes.