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

docs(grid): correct import paths, remove controls warning #9202

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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