Skip to content

Commit

Permalink
fix(LabeledIconGroup) : fix links for tests
Browse files Browse the repository at this point in the history
fix DownloadLabeledIcon links for tests
  • Loading branch information
Odisseas Simou committed Mar 29, 2022
1 parent 535cee4 commit daa1065
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 71 deletions.
6 changes: 3 additions & 3 deletions src/ui/DownloadLabeledIcon/DownloadLabeledIcon.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Default.args = {
icon: 'ri-download-2-fill',
downloadIcon: 'ri-download-2-fill',
links: [
{ linkName: 'PDF', href: '#' },
{ linkName: 'SVG', href: '#' },
{ linkName: 'PNG', href: '#' },
{ linkName: 'PDF', href: '/#' },
{ linkName: 'SVG', href: '/#' },
{ linkName: 'PNG', href: '/#' },
],
};
108 changes: 40 additions & 68 deletions src/ui/LabeledIconGroup/LabeledIconGroup.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,80 +3,52 @@ import LabeledIconGroup from './LabeledIconGroup';
// eslint-disable-next-line import/no-unresolved

export default {
title: 'Components/Labeled Icons/Group',
component: LabeledIconGroup,
argTypes: {
newTabLabel: {
description: 'New Tab Label',
table: {
defaultValue: { summary: '""' },
type: { summary: 'string' },
},
title: 'Components/Labeled Icons/Group',
component: LabeledIconGroup,
argTypes: {
newTab: {
description: 'NewTabLabeledIcon Component Contents',
table: {
type: { summary: 'Object' },
defaultValue: { summary: ' "" ' },
},
},
download: {
description: 'DownloadLabeledIcon Component Contents',
table: {
type: { summary: 'Object' },
defaultValue: { summary: ' "" ' },
},
}
},
newTabLink: {
description: 'New Tab Link',
table: {
defaultValue: { summary: '""' },
type: { summary: 'string' },
},
},
newTabIcon: {
description: 'New Tab Icon',
table: {
defaultValue: { summary: '""' },
type: { summary: 'string' },
},
},
downloadLabel: {
description: 'Download Label',
table: {
defaultValue: { summary: '""' },
type: { summary: 'string' },
},
},
downloadIcon: {
description: 'Download Icon',
table: {
defaultValue: { summary: '""' },
type: { summary: 'string' },
},
},
downloadLinks: {
description: 'array of list content',
table: {
type: { summary: 'object' },
defaultValue: { summary: ' "" ' },
},
},
},
};

const DefaultTemplate = (args) => (
<div>
<LabeledIconGroup {...args}>
<LabeledIconGroup.Download {...args.download}></LabeledIconGroup.Download>
<LabeledIconGroup.NewTab {...args.newTab}>
{args.newTab.label}
</LabeledIconGroup.NewTab>
</LabeledIconGroup>
</div>
<div>
<LabeledIconGroup {...args}>
<LabeledIconGroup.Download {...args.download}></LabeledIconGroup.Download>
<LabeledIconGroup.NewTab {...args.newTab}>
{args.newTab.label}
</LabeledIconGroup.NewTab>
</LabeledIconGroup>
</div>
);

export const Default = DefaultTemplate.bind({});
Default.args = {
newTab: {
label: 'Open in new Tab',
link: '/#',
icon: 'ri-share-box-fill',
},
download: {
label: 'Download',
icon: 'ri-download-2-fill',
downloadIcon: 'ri-download-2-fill',
links: [
{ linkName: 'PDF', href: '#' },
{ linkName: 'SVG', href: '#' },
{ linkName: 'PNG', href: '#' },
],
},
newTab: {
label: 'Open in new Tab',
link: '/#',
icon: 'ri-share-box-fill',
},
download: {
label: 'Download',
icon: 'ri-download-2-fill',
downloadIcon: 'ri-download-2-fill',
links: [
{ linkName: 'PDF', href: '/#' },
{ linkName: 'SVG', href: '/#' },
{ linkName: 'PNG', href: '/#' },
],
},
};

0 comments on commit daa1065

Please sign in to comment.