-
-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Card, FlatCard, ImageCard, ResourceCard, and ValueCard compon…
…ents to typescript (#1802)
- Loading branch information
1 parent
98b3928
commit 86554f1
Showing
23 changed files
with
285 additions
and
200 deletions.
There are no files selected for viewing
18 changes: 6 additions & 12 deletions
18
components/Cards/Card/Card.js → components/Cards/Card/Card.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
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,19 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import { descriptions } from 'common/constants/descriptions'; | ||
import Card from '../Card'; | ||
|
||
type CardStoryType = StoryObj<typeof Card>; | ||
|
||
const meta: Meta<typeof Card> = { | ||
title: 'Cards/Card', | ||
component: Card, | ||
args: { | ||
children: descriptions.medium, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Default: CardStoryType = { | ||
render: args => <Card {...args} />, | ||
}; |
1 change: 0 additions & 1 deletion
1
components/Cards/Card/__tests__/Card.test.js → ...onents/Cards/Card/__tests__/Card.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.
40 changes: 24 additions & 16 deletions
40
components/Cards/ImageCard/ImageCard.js → components/Cards/ImageCard/ImageCard.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
18 changes: 0 additions & 18 deletions
18
components/Cards/ImageCard/__stories__/ImageCard.stories.js
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
components/Cards/ImageCard/__stories__/ImageCard.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 ImageCard from '../ImageCard'; | ||
|
||
type ImageCardPropsType = StoryObj<typeof ImageCard>; | ||
|
||
const meta: Meta<typeof ImageCard> = { | ||
title: 'Cards/ImageCard', | ||
component: ImageCard, | ||
args: { | ||
alt: 'Image Card', | ||
children: descriptions.long, | ||
imageSource: `${s3}redesign/heroBanners/about.jpg`, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Default: ImageCardPropsType = { | ||
render: args => <ImageCard {...args} /> | ||
}; |
1 change: 0 additions & 1 deletion
1
...rds/ImageCard/__tests__/ImageCard.test.js → ...ds/ImageCard/__tests__/ImageCard.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
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.