Skip to content

Commit

Permalink
chore(docs): add story for sub body text component
Browse files Browse the repository at this point in the history
  • Loading branch information
realdreamer committed Aug 24, 2023
1 parent f83b7c7 commit 3ec3543
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { IProps, SubBodyText } from './SubBodyText';

import { Meta, StoryObj } from '@storybook/react';
import React from 'react';

const selectOptions: string[] = ['p', 'span'];

const meta: Meta<IProps> = {
title: 'Typography/SubBodyText',
argTypes: {
as: {
options: selectOptions,
control: {
type: 'select',
},
},
bold: {
control: {
type: 'boolean',
},
},
},
};

export default meta;
type Story = StoryObj<IProps>;

export const Default: Story = {
name: 'Default',
args: {
as: 'p',
bold: false,
},
render: ({ as, bold }) => (
<div>
<SubBodyText as={as} bold={bold}>
Hello! I&apos;m sub body text...!
</SubBodyText>
</div>
),
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ITextProps, Text } from '@kadena/react-ui';

import React, { FC, ReactNode } from 'react';

interface IProps {
export interface IProps {
children?: ReactNode;
as?: ITextProps['as'];
bold?: ITextProps['bold'];
Expand Down

0 comments on commit 3ec3543

Please sign in to comment.