1.1.0 • Published 3 years ago
alertz v1.1.0
Alertz
- Customize Alert & 2 Options
Preview

Setup
npm install alertzor
yarn add alertzUsage
Alert
- type="alert" (default)
import { useState } from 'react';
import { Alertz } from 'alertz';
function App() {
const [open, setOpen] = useState(false);
const handleClick = () => {
setOpen(!open);
};
return (
<div>
<button onClick={handleClick}>Click</button>
<Alertz show={open} buttonB={{ onClick: handleClick }} />
</div>
);
}
export default App;2 Options
- type="confirm"
import { useState } from 'react';
import { Alertz } from 'alertz';
function App() {
const [open, setOpen] = useState(false);
const handleClick = () => {
setOpen(!open);
};
return (
<div>
<button onClick={handleClick}>Click</button>
<Alertz type="confirm" show={open} buttonB={{ onClick: handleClick }} />
</div>
);
}
export default App;Customize
- Dark (Default) & Light Mode
<Alertz type="confirm" mode="light" title="Are You Sure ?" show={open} />| mode="dark" | mode="light" |
|---|---|
- titleColor & bgColor
<Alertz
bgColor="indigo"
titleColor="yellow"
type="confirm"
title="Are You Sure ?"
show={open}
/>- buttonsDirection="column" (default row)
<Alertz
type="confirm"
buttonsDirection="column"
title="Are You Sure ?"
show={open}
buttonB={{ title: 'Confirm' }}
buttonA={{ title: 'Cancel' }}
/>1.1.0
3 years ago
1.0.2
3 years ago
1.0.19
3 years ago
1.0.18
3 years ago
1.0.17
3 years ago
1.0.16
3 years ago
1.0.15
3 years ago
1.0.14
3 years ago
1.0.13
3 years ago
1.0.11
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
0.1.0
3 years ago