Skip to content

Commit

Permalink
chore(storybook): fix props not rendering for some components
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandra Davila committed Nov 17, 2020
1 parent 348bd61 commit fea08e4
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
select,
} from '@storybook/addon-knobs';
import NumberInput from '../NumberInput';
import { NumberInput as OGNumberInput } from './NumberInput';
import NumberInputSkeleton from '../NumberInput/NumberInput.Skeleton';
import mdx from './NumberInput.mdx';

Expand Down Expand Up @@ -65,10 +66,10 @@ const props = () => ({

export default {
title: 'NumberInput',
component: OGNumberInput,
decorators: [withKnobs],

parameters: {
component: NumberInput,
docs: {
page: mdx,
},
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/NumberInput/NumberInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ class NumberInput extends Component {
}
}

export { NumberInput };
export default (() => {
const forwardRef = (props, ref) => <NumberInput {...props} innerRef={ref} />;
forwardRef.displayName = 'NumberInput';
Expand Down
10 changes: 5 additions & 5 deletions packages/react/src/components/OverflowMenu/OverflowMenu-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { action } from '@storybook/addon-actions';
import { withKnobs, boolean, select, text } from '@storybook/addon-knobs';
import { withReadme } from 'storybook-readme';
import OverflowMenu from '../OverflowMenu';
import { OverflowMenu as OGOverflowMenu } from './OverflowMenu';
import OverflowMenuItem from '../OverflowMenuItem';
import OverflowREADME from './README.md';
import mdx from './OverflowMenu.mdx';
Expand Down Expand Up @@ -57,16 +58,15 @@ OverflowMenu.displayName = 'OverflowMenu';
export default {
title: 'OverflowMenu',
decorators: [withKnobs],
component: OGOverflowMenu,
subcomponents: {
OverflowMenuItem,
},

parameters: {
component: OverflowMenu,
docs: {
page: mdx,
},

subcomponents: {
OverflowMenuItem,
},
},
};

Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/OverflowMenu/OverflowMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ class OverflowMenu extends Component {
}
}

export { OverflowMenu };
export default (() => {
const forwardRef = (props, ref) => <OverflowMenu {...props} innerRef={ref} />;
forwardRef.displayName = 'OverflowMenu';
Expand Down
10 changes: 5 additions & 5 deletions packages/react/src/components/RadioButton/RadioButton-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { action } from '@storybook/addon-actions';

import { withKnobs, boolean, select, text } from '@storybook/addon-knobs';
import RadioButton from '../RadioButton';
import { RadioButton as OGRadioButton } from './RadioButton';
import RadioButtonSkeleton from '../RadioButton/RadioButton.Skeleton';
import mdx from './RadioButton.mdx';

Expand All @@ -35,16 +36,15 @@ const radioProps = () => ({
export default {
title: 'RadioButton',
decorators: [withKnobs],
component: OGRadioButton,
subcomponents: {
RadioButtonSkeleton,
},

parameters: {
component: RadioButton,
docs: {
page: mdx,
},

subcomponents: {
RadioButtonSkeleton,
},
},
};

Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/RadioButton/RadioButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ class RadioButton extends React.Component {
}
}

export { RadioButton };
export default (() => {
const forwardRef = (props, ref) => <RadioButton {...props} innerRef={ref} />;
forwardRef.displayName = 'RadioButton';
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/components/Tooltip/Tooltip-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
boolean,
} from '@storybook/addon-knobs';
import Tooltip from '../Tooltip';
import { Tooltip as OGTooltip } from './Tooltip';
import Button from '../Button';
import { OverflowMenuVertical16 } from '@carbon/icons-react';
import mdx from './Tooltip.mdx';
Expand Down Expand Up @@ -127,10 +128,10 @@ function UncontrolledTooltipExample() {

export default {
title: 'Tooltip',
component: OGTooltip,
decorators: [withKnobs],

parameters: {
component: Tooltip,
docs: {
page: mdx,
},
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ class Tooltip extends Component {
}
}

export { Tooltip };
export default (() => {
const forwardRef = (props, ref) => <Tooltip {...props} innerRef={ref} />;
forwardRef.displayName = 'Tooltip';
Expand Down

0 comments on commit fea08e4

Please sign in to comment.