Skip to content

Commit

Permalink
chore(storybook): fix props not rendering for some components (#7303)
Browse files Browse the repository at this point in the history
* chore(storybook): fix props not rendering for some components

* chore(docs): remove warning text from props docs
  • Loading branch information
Alessandra Davila committed Nov 18, 2020
1 parent fae7d82 commit cb74016
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 32 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
5 changes: 0 additions & 5 deletions packages/react/src/components/NumberInput/NumberInput.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ import { Props } from '@storybook/addon-docs/blocks';

## Component API

We are currently investigating why the props are not displaying properly for
this component. In the meantime, please
[view the source code](https://github.com/carbon-design-system/carbon/blob/master/packages/react/src/components/NumberInput/NumberInput.js#L43-L146)
directly to view the `PropType` definitions.

<Props />

## Feedback
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
5 changes: 0 additions & 5 deletions packages/react/src/components/OverflowMenu/OverflowMenu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ import { Props } from '@storybook/addon-docs/blocks';

## Component API

We are currently investigating why the props are not displaying properly for
this component. In the meantime, please
[view the source code](https://github.com/carbon-design-system/carbon/blob/master/packages/react/src/components/OverflowMenu/OverflowMenu.js#L98-L217)
directly to view the `PropType` definitions.

<Props />

## Feedback
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
5 changes: 0 additions & 5 deletions packages/react/src/components/RadioButton/RadioButton.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ import { Props } from '@storybook/addon-docs/blocks';

## Component API

We are currently investigating why the props are not displaying properly for
this component. In the meantime, please
[view the source code](https://github.com/carbon-design-system/carbon/blob/master/packages/react/src/components/RadioButton/RadioButton.js#L18-L81)
directly to view the `PropType` definitions.

<Props />

## Feedback
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
5 changes: 0 additions & 5 deletions packages/react/src/components/Tooltip/Tooltip.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ import { Props } from '@storybook/addon-docs/blocks';

## Component API

We are currently investigating why the props are not displaying properly for
this component. In the meantime, please
[view the source code](https://github.com/carbon-design-system/carbon/blob/master/packages/react/src/components/Tooltip/Tooltip.js#L89-L202)
directly to view the `PropType` definitions.

<Props />

## Feedback
Expand Down

0 comments on commit cb74016

Please sign in to comment.