-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
css modules not showing in storybook
- Loading branch information
Showing
8 changed files
with
4,489 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
typescript: { | ||
check: false, | ||
checkOptions: {}, | ||
reactDocgen: "react-docgen-typescript", | ||
reactDocgenTypescriptOptions: { | ||
shouldExtractLiteralValuesFromEnum: true, | ||
propFilter: prop => | ||
prop.parent ? !/node_modules/.test(prop.parent.fileName) : true, | ||
}, | ||
}, | ||
addons: ["storybook-css-modules-preset"], | ||
stories: ["../stories/*.stories.@(ts|tsx)"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as React from "react" | ||
import styles from "./title.module.css" | ||
|
||
type Props = { | ||
text: string | ||
} | ||
|
||
const Title = ({ text }: Props) => { | ||
return ( | ||
<div> | ||
<h2 className={styles.title}>{text}</h2> | ||
</div> | ||
) | ||
} | ||
|
||
export default Title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.title { | ||
color: blue; | ||
font-weight: bold; | ||
font-size: 30px; | ||
} | ||
|
||
.title:hover { | ||
color: red; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
template/packages/frontend/pages/recipes/recipes.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.inputText { | ||
padding: 0.3rem; | ||
font-size: 20px; | ||
} | ||
|
||
.submitButton { | ||
background-color: #6db9ee; /* Green */ | ||
border: none; | ||
color: white; | ||
padding: 15px 32px; | ||
text-align: center; | ||
text-decoration: none; | ||
display: inline-block; | ||
font-size: 16px; | ||
} | ||
|
||
.submitButton:hover { | ||
background-color: #2f79ad; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import * as React from "react" | ||
import { storiesOf } from "@storybook/react" | ||
import Title from "../components/Title" | ||
|
||
storiesOf("Title", module).add("with text", () => { | ||
return <Title text={"My Title"} /> | ||
}) |
Oops, something went wrong.