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

V8 migration #86

Merged
merged 7 commits into from
Jul 19, 2024
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
6 changes: 3 additions & 3 deletions .storybook/Button/Button.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ export const ButtonMultiple = () => (

ButtonNormal.parameters = {
zeplinLink:
"zpl://components?pid=5ecff3a2d8a8ab2a61937a66&coids=6050f561b398fd6ec62563ff",
"https://app.zeplin.io/project/62380c9fa84e9916db1710b0/styleguide/components?coid=63345e42ecd1379acf991123",
};

ButtonPressed.parameters = {
zeplinLink:
"zpl://components?pid=5ecff3a2d8a8ab2a61937a66&coids=6050f561afc34742f62d40b9",
"https://app.zeplin.io/project/62380c9fa84e9916db1710b0/styleguide/components?coid=63345e4297f930b58e7a3a8d",
};

ButtonDisabled.parameters = {
zeplinLink:
"zpl://components?pid=5ecff3a2d8a8ab2a61937a66&coids=6050f5610d8b6e6cd0c1f8b2",
"https://app.zeplin.io/project/62380c9fa84e9916db1710b0/styleguide/components?coid=63345e42ecd1379acf991123",
};

ButtonMultiple.parameters = {
Expand Down
9 changes: 8 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,12 @@ if(!IS_PRODUCTION) {

module.exports = {
stories,
addons: ["../dist/register"],
addons: ["../dist/register", "@storybook/addon-webpack5-compiler-babel"],
framework: "@storybook/react-webpack5",
babel: async (options) => {
return {
...options,
presets: ['@babel/preset-react', '@babel/preset-typescript'],
};
},
};
15 changes: 9 additions & 6 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React from "react";
import { addDecorator } from '@storybook/react';
import { ThemeProvider, themes, convert } from '@storybook/theming';
import { ThemeProvider, convert, themes } from '@storybook/theming';

const withTheme = story => <ThemeProvider theme={convert(themes.normal)}>
{story()}
</ThemeProvider>
const withTheme = (StoryFn) => {
return (
<ThemeProvider theme={convert(themes.light)}>
<StoryFn />
</ThemeProvider>
)
}

addDecorator(withTheme)
export const decorators = [withTheme]
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,25 @@

## Requirements

- Storybook@>=5.0.0

This addon should work with any framework. If you find a case that the addon does not work, please open an issue.
Storybook Zeplin addon v3 is compatible with Storybook 8 and Node Version >18.
For Storybook versions 5-7, please use Storybook Zeplin addon v2.0.3

## Getting started

### 1. Install

For using Storybook 8:
```sh
npm install --save-dev storybook-zeplin
# yarn add -D storybook-zeplin
```

For using Storybook version 5-7:
```sh
npm install --save-dev [email protected]
# yarn add -D [email protected]
```

### 2. Register the addon in `main.js`

```js
Expand All @@ -50,7 +56,7 @@ module.exports = {
};
```

If you're using [email protected];
If you're using [email protected]:

```js
// .storybook/addons.js
Expand Down
Loading