sfida-alert-component
TypeScript icon, indicating that this package has built-in type declarations

0.1.1-7 • Public • Published

Intro

Componente Alert

Uso Base

Il componente ha due richieste obligatoire, il contenuto del componente e il tipo di Alert

import { AlertComponent } from "sfida-alert-component/esm";

<AlertComponent type="warning">
    This is a warning alert — check it out
</AlertComponent>

Il type può essere di 4 tipi

type: "warning" | "error" | "info" | "success";


withClose

Tra i parametri opzionali c'è la possibilità di rendere chiudibile l'alert

<AlertComponent withClose title="ciao" type="error">
    This is a error alert — check it out
</AlertComponent>

implementazione trmaite metodo

è possibile utilizzare, al posto del componente,il metodo getAlert() dell'ogetto useAlertServices, utilizzando gli stessi parametri utilizzati dal componente

getAlert({
    children: "Testo",
    type: "error",
    withClose: true,
})

Readme

Keywords

none

Package Sidebar

Install

npm i sfida-alert-component

Weekly Downloads

0

Version

0.1.1-7

License

none

Unpacked Size

1.64 MB

Total Files

33

Last publish

Collaborators

  • francescomain