Skip to content

Commit

Permalink
docs(toast): 📝 toast stories hide toast fix
Browse files Browse the repository at this point in the history
  • Loading branch information
navin-moorthy committed Nov 9, 2020
1 parent 344b49a commit 2f3474c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/toast/stories/ToastCSSAnimated.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ export const App: React.FC = () => {
animationTimeout={500}
toastWrapper={CSSTransitionAnimationWrapper}
toastTypes={{
error: ({ remove, content, id }) => {
error: ({ hideToast, content, id }) => {
return (
<div className="toast" style={{ backgroundColor: "#f02c2d" }}>
{content} <button onClick={() => remove(id)}>x</button>
{content} <button onClick={() => hideToast(id)}>x</button>
</div>
);
},
success: ({ remove, content, id }) => {
success: ({ hideToast, content, id }) => {
return (
<div className="toast" style={{ backgroundColor: "#01c24e" }}>
{content} <button onClick={() => remove(id)}>x</button>
{content} <button onClick={() => hideToast(id)}>x</button>
</div>
);
},
warning: ({ remove, content, id }) => {
warning: ({ hideToast, content, id }) => {
return (
<div className="toast" style={{ backgroundColor: "#ef5013" }}>
{content} <button onClick={() => remove(id)}>x</button>
{content} <button onClick={() => hideToast(id)}>x</button>
</div>
);
},
Expand Down
12 changes: 6 additions & 6 deletions src/toast/stories/ToastReactSpring.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,24 @@ export const App: React.FC = () => {
animationTimeout={500}
toastWrapper={SpringAnimationWrapper}
toastTypes={{
error: ({ remove, content, id }) => {
error: ({ hideToast, content, id }) => {
return (
<div className="toast" style={{ backgroundColor: "#f02c2d" }}>
{content} <button onClick={() => remove(id)}>x</button>
{content} <button onClick={() => hideToast(id)}>x</button>
</div>
);
},
success: ({ remove, content, id }) => {
success: ({ hideToast, content, id }) => {
return (
<div className="toast" style={{ backgroundColor: "#01c24e" }}>
{content} <button onClick={() => remove(id)}>x</button>
{content} <button onClick={() => hideToast(id)}>x</button>
</div>
);
},
warning: ({ remove, content, id }) => {
warning: ({ hideToast, content, id }) => {
return (
<div className="toast" style={{ backgroundColor: "#ef5013" }}>
{content} <button onClick={() => remove(id)}>x</button>
{content} <button onClick={() => hideToast(id)}>x</button>
</div>
);
},
Expand Down

0 comments on commit 2f3474c

Please sign in to comment.