Skip to content

Commit

Permalink
fix: @storybook/react/demo has been removed and a replacement compone…
Browse files Browse the repository at this point in the history
  • Loading branch information
MH4GF committed Apr 3, 2023
1 parent 86a62f2 commit 649fbee
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 3 deletions.
10 changes: 10 additions & 0 deletions examples/v7-managed-react/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<style>
.button {
border: 1px solid #eee;
border-radius: 3;
background-color: #FFFFFF;
cursor: pointer;
font-size: 15;
padding: 3px 10px;
margin: 10;
}

.my-button {
cursor: pointer;
height: 32px;
Expand Down
7 changes: 7 additions & 0 deletions examples/v7-managed-react/src/Button.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

export const Button = ({ children, onClick }) => (
<button className='button' onClick={onClick} type="button">
{children}
</button>
);
2 changes: 1 addition & 1 deletion examples/v7-managed-react/src/Button.stories.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Button } from '@storybook/react/demo';
import { Button } from './Button';
import { action } from '@storybook/addon-actions';

import { isScreenshot } from 'storycap';
Expand Down
5 changes: 5 additions & 0 deletions examples/v7-managed-react/src/Welcome.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const Welcome = ({ showApp }) => (
<button type="button" onClick={showApp}>
Welcome
</button>
);
2 changes: 1 addition & 1 deletion examples/v7-managed-react/src/Welcome.stories.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { linkTo } from '@storybook/addon-links';
import { Welcome } from '@storybook/react/demo';
import { Welcome } from './Welcome';

export default {
title: 'Welcome',
Expand Down
2 changes: 1 addition & 1 deletion examples/v7-managed-react/src/WelcomeOverride.stories.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { linkTo } from '@storybook/addon-links';
import { Welcome } from '@storybook/react/demo';
import { Welcome } from './Welcome';

export default {
title: 'Welcome Override',
Expand Down

0 comments on commit 649fbee

Please sign in to comment.