Skip to content

Commit

Permalink
docs(grid): correct import paths, remove controls warning (#9202)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
tay1orjones and kodiakhq[bot] authored Jul 29, 2021
1 parent 71bc970 commit 92e0500
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
12 changes: 6 additions & 6 deletions packages/carbon-react/src/components/Grid/Grid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ Carbon's grid components help developers use the
[2x Grid](https://www.carbondesignsystem.com/guidelines/2x-grid/overview). The
project provides `Grid` and `Column` components which can be used to build a
variety of layouts. You can import these components from
`carbon-components-react`:
`@carbon/react`:

```js
import { Grid, Column } from 'carbon-components-react';
import { Grid, Column } from '@carbon/react';
```

<Preview>
Expand All @@ -65,7 +65,7 @@ number `4` to specify that each `Column` component should span 4 columns at that
breakpoint.

```js
import { Grid, Column } from 'carbon-components-react';
import { Grid, Column } from '@carbon/react';

function MyComponent() {
return (
Expand All @@ -79,7 +79,7 @@ function MyComponent() {
}
```

_Note: by default, `carbon-components` ships with a 16 column grid._
_Note: by default, `@carbon/styles` ships with a 16 column grid._

You can pair up multiple breakpoint props to specify how many columns the
`Column` component should span at different break points. In the example below,
Expand Down Expand Up @@ -216,7 +216,7 @@ to a `section`. Simililarly, we use the `as` prop on `Column` to change it from
a `div` to an `article`.

```jsx
import { Grid, Column } from 'carbon-components-react';
import { Grid, Column } from '@carbon/react';

function MyComponent() {
return (
Expand All @@ -234,7 +234,7 @@ You can also provide a custom component to the `as` prop. This custom component
should accept all props passed to it, like a class name for the column.

```jsx
import { Grid, Column } from 'carbon-components-react';
import { Grid, Column } from '@carbon/react';

function Article({ children, ...rest }) {
return <article {...rest}>{children}</article>;
Expand Down
12 changes: 4 additions & 8 deletions packages/carbon-react/src/components/Grid/Grid.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,14 @@ export default {
),
],
parameters: {
controls: {
include: [], // ensure props are not displayed on the controls pane
hideNoControlsWarning: true,
},
docs: {
page: mdx,
},
},
argTypes: {
narrow: {
control: false,
},
condensed: {
control: false,
},
},
};

export const Wide = () => {
Expand Down

0 comments on commit 92e0500

Please sign in to comment.