Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DSS-183]: Storybook Components Not Displaying Code Examples #1612

Merged
merged 11 commits into from
Oct 4, 2022
8 changes: 3 additions & 5 deletions packages/sage-react/lib/FormSection/FormSection.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ const Template = (args) => <FormSection {...args} />;
export const Default = Template.bind({});
Default.decorators = [
(Story) => (
<>
<div style={{ width: '75%', marginLeft: 'auto', marginRight: 'auto' }}>
<Story />
</div>
</>
<div style={{ width: '75%', marginLeft: 'auto', marginRight: 'auto' }}>
{Story()}
</div>
)
];
2 changes: 1 addition & 1 deletion packages/sage-react/lib/IconCard/IconCard.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Default.decorators = [
(Story) => (
<>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Story />
{Story()}
</div>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/sage-react/lib/Loader/Loader.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Default.decorators = [
<>
<Grid container={Grid.CONTAINER_SIZES.MD}>
<Card>
<Story />
{Story()}
</Card>
</Grid>
</>
Expand Down
8 changes: 2 additions & 6 deletions packages/sage-react/lib/Popover/Popover.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,10 @@ Default.decorators = [
<>
<div
style={{
height: '100vh',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
width: '100%'
height: '450px',
}}
>
<Story />
{Story()}
</div>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/sage-react/lib/Select/Select.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Select } from './Select';
export default {
title: 'Sage/Select',
component: Select,
decorators: [(Story) => <div style={{ width: 300, marginLeft: 'auto', marginRight: 'auto' }}><Story /></div>],
decorators: [(Story) => <div style={{ width: 300, marginLeft: 'auto', marginRight: 'auto' }}>{Story()}</div>],
args: {
label: 'Select',
id: 'field-1',
Expand Down
4 changes: 2 additions & 2 deletions packages/sage-react/lib/Table/Table.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Default.decorators = [
(Story) => (
<>
<Panel>
<Story />
{Story()}
</Panel>
<div className={`${SageClassnames.TYPE_BLOCK} ${SageClassnames.SPACERS.LG_TOP}`}>
<p>NOTE: Wiring the select all checkbox requires the following:</p>
Expand Down Expand Up @@ -97,7 +97,7 @@ TableWithRichContent.decorators = [
(Story) => (
<>
<Panel>
<Story />
{Story()}
</Panel>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/sage-react/lib/Tooltip/Tooltip.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Tooltip } from './Tooltip';
export default {
title: 'Sage/Tooltip',
component: Tooltip,
decorators: [(Story) => <div style={{ padding: 100, display: 'flex', alignItems: 'center', justifyContent: 'center' }}><Story /></div>],
decorators: [(Story) => <div style={{ padding: 100, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>{Story()}</div>],
argTypes: {
...selectArgs({
position: Tooltip.POSITIONS,
Expand Down
2 changes: 1 addition & 1 deletion packages/sage-react/lib/Topbar/Topbar.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Default.decorators = [
>
Show Topbar
</Button>
<Story />
{Story()}
</>
)
];
2 changes: 1 addition & 1 deletion packages/sage-react/lib/Type/Type.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Default.decorators = [
(Story) => (
<>
<Grid container={Grid.CONTAINER_SIZES.SM}>
<Story />
{Story()}
</Grid>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion packages/sage-react/lib/UploadCard/UploadCard.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Default.decorators = [
(Story) => (
<>
<Grid container={Grid.CONTAINER_SIZES.MD}>
<Story />
{Story()}
</Grid>
</>
)
Expand Down