alert
This component will allow you to give visual feedback to the end user when they complete an action. Alert loads lazily
default alert
import { openAlert, Button } from "dialui-components";
export const MyComponent = () => {
const handleClick = () => {
openAlert({
message: "Share these components",
type: "info",
});
};
return <Button onClick={handleClick}> click </Button>;
};
Default Props:
- message= required;
- type= required;
- sideY= 'up';
- sideX= 'right';
- duration= 2000;
Props:
- message: string;
- type: 'success' | 'error' | 'warning' | 'info';
- sideY?: 'up' | 'down';
- sideX?: 'left' | 'right';
- duration?: number;