Skip to content

Commit deacc55

Browse files
author
Martyn Hoyer
committed
Update readme with deprecation notes
1 parent c930ec5 commit deacc55

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

Diff for: readme.md

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,44 @@
11
# storybook-styled-components
22

3-
![Theme Picker Animation](./docs/theme-picker.gif)
3+
**DEPRECATED!**
4+
5+
This plugin has issues when used with Storybook v5 and beyond, and there's a better option available at:
6+
https://github.com/echoulen/storybook-addon-styled-component-theme
47

5-
### Switch between themes and see how your components react
8+
![Theme Picker Animation](./docs/theme-picker.gif)
69

10+
_Switch between themes and see how your components react_
711

812
## Set It Up
913

1014
inside your storybook addons, register the `storybook-styled-components`:
1115

1216
```javascript
1317
// addons.js
14-
import 'storybook-styled-components/register'
18+
import "storybook-styled-components/register";
1519
```
1620

1721
In your config.js, define your theme configuration and pass it in to the `addDecorator` function
1822

19-
2023
```javascript
2124
// config.js
22-
import { configure, addDecorator } from '@storybook/react'
23-
import { withThemes } from 'storybook-styled-components'
25+
import { configure, addDecorator } from "@storybook/react";
26+
import { withThemes } from "storybook-styled-components";
2427

2528
// then import your themes
26-
import firstTheme from './src/themes/first'
27-
import secondTheme from './src/themes/second'
29+
import firstTheme from "./src/themes/first";
30+
import secondTheme from "./src/themes/second";
2831

2932
const themes = {
30-
'First Theme': firstTheme,
31-
'Second Theme': secondTheme,
32-
}
33+
"First Theme": firstTheme,
34+
"Second Theme": secondTheme
35+
};
3336

3437
// now add the decorator
35-
addDecorator(withThemes(themes))
38+
addDecorator(withThemes(themes));
3639
// done!
3740
```
3841

39-
#### This is still a Work In Progress ... Feedback welcomed
42+
**This is still a Work In Progress ... Feedback welcomed**
4043

41-
# [Read The License](./license.md)
44+
[Read The License](./license.md)

0 commit comments

Comments
 (0)