Skip to content

Commit

Permalink
fix: some beta docs based on feedback (#2507)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnm2377 authored Aug 23, 2021
1 parent b5a0cdd commit 0f488c7
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/pages/migrating/guide/develop.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ npm -i @carbon/react
```

```
yarn install @carbon/react
yarn add @carbon/react
```

2. Remove the old packages
Expand All @@ -86,6 +86,15 @@ npm uninstall carbon-components carbon-components-react carbon-icons
yarn remove carbon-components carbon-components-react carbon-icons
```

<InlineNotification>

While this release is still in beta, you may have to keep `carbon-components`,
`carbon-components-react` and `carbon-icons` installed since `@carbon/react` is
importing them. In the future, these will be included as peer dependencies in
the package, and you won't have to install them.

</InlineNotification>

3. Update package imports. Migration for this can be as easy as
find-and-replace. Search for anywhere you're importing components or icons
and update the import to point to `@carbon/react`. Read the next section
Expand All @@ -100,10 +109,10 @@ function MyComponent() {
```

```js
import { Add } from '@carbon/react/icons';
import { Add16 } from '@carbon/react/icons';

function MyComponent() {
return <Add />;
return <Add16 />;
}
```

Expand Down Expand Up @@ -449,11 +458,9 @@ theming, or render a theme for an entire page.
Here is an example of how you can use the `Theme` component:

```jsx
import { g90 } from '@carbon/themes';

<Theme theme={g90}>
<Theme theme="g90">
<ChildComponent />
</Theme>;
</Theme>
```

To learn more about how our `Theme` component works with our `useTheme` hook,
Expand Down

0 comments on commit 0f488c7

Please sign in to comment.