import { Meta } from '@storybook/addon-docs';
import Link from '@cloudscape-design/components/link';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';

<Meta title="Migration/Checkbox" />

# Migrating from NorthStar legacy - Checkbox

Use <Link href='https://cloudscape.design/components/checkbox' target='_blank' external>Cloudscape Checkbox component</Link>. 

If the Checkbox is used in a Form setting, it is recommended to 
use <Link href='https://aws.github.io/aws-northstar/?path=/story/components-formrenderer--default' target='_blank' external>NorthStar v2 FormRenderer component</Link> 
to build the form from JSON schema. 

## Update Import

```diff
- import Checkbox from 'aws-northstar/components/Checkbox';
+ import Checkbox from '@cloudscape-design/components/checkbox'';
```

export const Component = () => {
  return <SyntaxHighlighter/>;
};