@violetui/snackbar
v0.1.1-beta.0
Published
Vui Snackbar Component Repository.
Downloads
3
Readme
@violetui/snackbar
Usage
first import the Snackbar component:
const Snackbar = require('@violetui/snackbar');
// or
import Snackbar From '@violetui/snackbar'
use it:
<Snackbar
startIcon={<Icon/>}
action={{
name:'Undo',
onClick()=>{
// some operation
}
}}
endIcon={{
icon:<CloseIcon/>,
onClick(){
// close snack?
}
}}
color="default"
>
the text inside snackbar
</Snackbar>
Props
color(optional): "primary" | "secondary" | "tertiary" | "error" | "warning" | "success" | "default"
children: ReactElement
startIcon(optional): ReactElement
endIcon(optional): Object --> {icon:ReactElement , onClick:function}
action(optional): Object --> {name:string , onClick:function}