-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from almond-bongbong/feature/upgrade-module
Feature/upgrade module
- Loading branch information
Showing
11 changed files
with
382 additions
and
144 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
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
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 @@ | ||
export { default } from './theme'; |
Empty file.
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,40 @@ | ||
import React from 'react'; | ||
import CommonHighlighter from '../../component/common-highlighter'; | ||
import Button from '../../component/button'; | ||
import toast from 'react-simple-toasts'; | ||
import 'react-simple-toasts/dist/theme/dark.css'; | ||
|
||
function Theme() { | ||
return ( | ||
<div> | ||
<h2>Theme</h2> | ||
<p> | ||
react-simple-toasts has a default theme, but you can customize it by | ||
passing a theme object to the toast function. | ||
</p> | ||
<br /> | ||
<Button onClick={() => { | ||
toast('Hello, World!', { duration: Infinity, theme: 'dark' }); | ||
}}> | ||
Light theme | ||
</Button> | ||
<br /> | ||
<br /> | ||
<CommonHighlighter>{`import toast from 'react-simple-toasts'; | ||
export default function App() { | ||
return ( | ||
<button onClick={() => toast('Hello, World!', { theme: 'light' })}> | ||
Show Toast | ||
</button> | ||
); | ||
}`}</CommonHighlighter> | ||
|
||
<section> | ||
<h3></h3> | ||
</section> | ||
</div> | ||
); | ||
} | ||
|
||
export default Theme; |
Oops, something went wrong.