diff --git a/src/stories/components/InfoCard.stories.tsx b/src/stories/components/InfoCard.stories.tsx new file mode 100644 index 00000000..1b80b560 --- /dev/null +++ b/src/stories/components/InfoCard.stories.tsx @@ -0,0 +1,25 @@ +import { Meta, StoryObj } from '@storybook/react'; +import { InfoCard } from 'src/views/components/common/InfoCard/InfoCard'; + +const meta = { + title: 'Components/Common/InfoCard', + component: InfoCard, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], + argTypes: { + titleText: { control: 'text' }, + bodyText: { control: 'text' }, + }, +} satisfies Meta; +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + titleText: 'WAITLIST SIZE', + bodyText: '14 Students', + }, +}; \ No newline at end of file diff --git a/src/views/components/common/InfoCard/InfoCard.tsx b/src/views/components/common/InfoCard/InfoCard.tsx new file mode 100644 index 00000000..352648b9 --- /dev/null +++ b/src/views/components/common/InfoCard/InfoCard.tsx @@ -0,0 +1,53 @@ +import React from 'react'; +import Text from '../Text/Text'; + +interface Props { + titleText: string; + bodyText: string; +} + +/** + * A maybe reusable InfoCard component that follows the design system of the extension. + * @returns + */ +export function InfoCard({ + titleText, + bodyText +}: React.PropsWithChildren): JSX.Element { + return ( +
+
+ + {titleText} + + + {bodyText} + + +
+ ); +}