0.0.3 • Published 2 years ago

openknowl-eungwang-library v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

openknowl-eungwang-library

Installation

$ npm install --save openknowl-eungwang-library
$ yarn add openknowl-eungwang-library

Guide

useToast

@ required

// root경로 (ex. App.tsx)
<div id='toast-root' />

@ the gist

const { openToast } = useToast();
<button
  onClick={() => {
    openToast({
      type: 'success',
      message: 'wow!',
    })
  }}
>
  click
</button>

Demo

useToast

https://codesandbox.io/s/romantic-mayer-5lclub?file=/src/App.tsx

Props

openToast

Prop nametypeDefault valuerequired
type"success" | "error" | "warn" | "info"n/aO
messagestringn/aX