Skip to content

Commit

Permalink
Fix pagercontainer,header,radioinput stories
Browse files Browse the repository at this point in the history
  • Loading branch information
roshni73 authored and samshara committed Jun 18, 2024
1 parent 94086d4 commit 9cc2b1b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 26 deletions.
32 changes: 18 additions & 14 deletions packages/go-ui-storybook/src/stories/Header.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
HeaderProps,
} from '@ifrc-go/ui';
import type {
Args,
Meta,
StoryObj,
} from '@storybook/react';
Expand All @@ -25,47 +26,50 @@ const meta: Meta<typeof Header> = {
},
},
tags: ['autodocs'],
decorators: [
function Component(_, ctx) {
const componentArgs = ctx.args as HeaderSpecificProps;
return (
<Header
// eslint-disable-next-line react/jsx-props-no-spreading
{...componentArgs}

/>
);
},
],
};

export default meta;
function Template(args:Args) {
return (
<Header
// eslint-disable-next-line react/jsx-props-no-spreading
{...args}
heading="Company Overview"
/>
);
}

export const Default: Story = {
render: Template,
args: {
heading: 'Company Overview',
headingDescription: 'Learn more about our company and what sets us apart in the market.',
headingLevel: 2,
},
};

export const EllipsizeHeading: Story = {
render: Template,
args: {
heading: 'Company Overview',
headingDescription: 'Learn more about our company and what sets us apart in the market.',
ellipsizeHeading: true,
},
};

export const WithIcon: Story = {
render: Template,
args: {
headingLevel: 2,
heading: 'Introduction',
icons: <WikiHelpSectionLineIcon />,
},
};

export const WithAction: Story = {
render: Template,
args: {
heading: 'Company Overview',
headingDescription: 'Learn more about our company and what sets us apart in the market.',
headingLevel: 2,
actions: [
<Button
name={undefined}
Expand Down
22 changes: 11 additions & 11 deletions packages/go-ui-storybook/src/stories/PageContainer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,40 +27,40 @@ export default meta;

export const Default: Story = {
args: {
children: 'Content goes here',
children: 'IFRC-GO',
contentAs: 'div',
containerAs: 'div',
},
};

export const WithNav: Story = {
args: {
children: 'Content goes here',
children: 'Home',
contentAs: 'nav',
containerAs: 'nav',
},
};

export const Header: Story = {
args: {
children: 'Content goes here',
children: 'IFRC Go',
contentAs: 'header',
containerAs: 'header',
},
};

export const Footer: Story = {
export const Main: Story = {
args: {
children: 'Content goes here',
contentAs: 'footer',
containerAs: 'footer',
children: 'IFRC GO aims to make all disaster information universally accessible and useful to IFRC responders for better decision making.',
contentAs: 'main',
containerAs: 'main',
},
};

export const Main: Story = {
export const Footer: Story = {
args: {
children: 'Content goes here',
contentAs: 'main',
containerAs: 'main',
children: 'About us',
contentAs: 'footer',
containerAs: 'footer',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const ReadOnly: Story = {
},
};

export const Clerable: Story = {
export const Clearable: Story = {
render: Template,
args: {
value: 'green',
Expand Down

0 comments on commit 9cc2b1b

Please sign in to comment.