Skip to content

docs: #548 - Add details about adding styles in the react project root #549

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
19 changes: 19 additions & 0 deletions docs/get-started.storybook.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@ To bring the design system into your project, install it as a package:
npm i @freenow/wave
```

## Getting started

After installing Wave as dependency, there are some extra steps to get the styles in place:

- Make sure to install the peerDependencies (including styled-components)
- Check that you don't have any pre-existing global styles that might override/clash with the styles shipped with the components (ex.: `a { color: #ffeeaa }`)
- Make sure to add the desired Color Scheme component to your React tree, to get the CSS variables loaded ([more details](https://wave.free-now.com/iframe.html?viewMode=docs&id=migration-to-v2--docs#1%EF%B8%8F%E2%83%A3-connect-classic-colors))

```typescript jsx
import { ModernColors } from '@freenow/wave'; // blue primary color

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<ModernColors />
<App />
</React.StrictMode>
);
```

## Usage

All of our components are exported by name from `@freenow/wave`, so you can import them with:
Expand Down