2a4887c30a
Hi, I'm submitting this PR for consideration as a new example app showing Styled JSX with SCSS working inside and outside storybook with example components. Only known issue: I noticed that when running this example with: `$ yarn next ./examples/with-storybook-styled-jsx-scss` I receive the following error: ``` error - ./pages/_app.js Error: [BABEL] .../next.js/examples/with-storybook-styled-jsx-scss/pages/_app.js: Cannot find module 'styled-jsx-plugin-sass' (While processing: ".../next.js/node_modules/next/babel.js") ``` However I notice that this same missing module error is triggered when running this existing example app "with-styled-jsx-scss". Any changes/tweaks needed? Thanks!
20 lines
513 B
TypeScript
20 lines
513 B
TypeScript
import React from 'react'
|
|
// also exported from '@storybook/react' if you can deal with breaking changes in 6.1
|
|
import { Story, Meta } from '@storybook/react/types-6-0'
|
|
|
|
import { Header, HeaderProps } from '../components/Header'
|
|
|
|
export default {
|
|
title: 'Example/Header',
|
|
component: Header,
|
|
} as Meta
|
|
|
|
const Template: Story<HeaderProps> = (args) => <Header {...args} />
|
|
|
|
export const LoggedIn = Template.bind({})
|
|
LoggedIn.args = {
|
|
user: {},
|
|
}
|
|
|
|
export const LoggedOut = Template.bind({})
|
|
LoggedOut.args = {}
|