Skip to content

Commit

Permalink
fix: fixed aspectratio and datatable
Browse files Browse the repository at this point in the history
  • Loading branch information
guidari committed Jan 8, 2025
1 parent d5fee4f commit a1d1220
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 31 deletions.
39 changes: 20 additions & 19 deletions packages/react/src/components/AspectRatio/AspectRatio.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,23 @@ export default {
},
};

export const Default = {
render: ({ ratio, ...args }) => {
return (
<Grid {...args}>
<Column sm={1} md={2} lg={4}>
<AspectRatio ratio={ratio}>Content</AspectRatio>
</Column>
<Column sm={1} md={2} lg={4}>
<AspectRatio ratio={ratio}>Content</AspectRatio>
</Column>
<Column sm={1} md={2} lg={4}>
<AspectRatio ratio={ratio}>Content</AspectRatio>
</Column>
<Column sm={1} md={2} lg={4}>
<AspectRatio ratio={ratio}>Content</AspectRatio>
</Column>
</Grid>
);
},
export const Default = (args) => {
return (
<Grid {...args}>
<Column sm={1} md={2} lg={4}>
<AspectRatio {...args}>Content</AspectRatio>
</Column>
<Column sm={1} md={2} lg={4}>
<AspectRatio {...args}>Content</AspectRatio>
</Column>
<Column sm={1} md={2} lg={4}>
<AspectRatio {...args}>Content</AspectRatio>
</Column>
<Column sm={1} md={2} lg={4}>
<AspectRatio {...args}>Content</AspectRatio>
</Column>
</Grid>
);
};

Default.argTypes = {
Expand All @@ -65,5 +63,8 @@ Default.argTypes = {
type: 'select',
},
options: ['16x9', '9x16', '2x1', '1x2', '4x3', '3x4', '1x1'],
table: {
category: 'AspectRatio',
},
},
};
13 changes: 1 addition & 12 deletions packages/react/src/components/DataTable/DataTable.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import {
TableBody,
} from '../DataTable';

import * as DataTableBasicStories from './stories/DataTable-basic.stories';
import { stackblitzPrefillConfig } from '../../../previewer/codePreviewer';

<Meta isTemplate />

# DataTable
Expand All @@ -21,15 +18,7 @@ import { stackblitzPrefillConfig } from '../../../previewer/codePreviewer';
&nbsp;|&nbsp;
[Accessibility](https://www.carbondesignsystem.com/components/data-table/accessibility)

<Canvas
of={DataTableBasicStories.Default}
additionalActions={[
{
title: 'Open in Stackblitz',
onClick: () => stackblitzPrefillConfig(DataTableBasicStories.Default),
},
]}
/>
<Canvas id="components-datatable-basic--default" />

{/* <!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> */}

Expand Down

0 comments on commit a1d1220

Please sign in to comment.