alert-momentum-ui
v1.0.2
Published
alert widget for cisco momentum-ui
Downloads
77
Maintainers
Readme
alert-momentum-ui
alert widget for cisco momentum-ui
Install
npm install --save alert-momentum-ui
Usage
import React from 'react';
import { AlertBox } from 'alert-momentum-ui';
//important: declare the box at root level of the app!
export default function App() {
return (
<div className="App">
<AlertBox></AlertBox>
<div>
<InnerPage></InnerPage>
</div>
<div>);
}
// method for fire an alert box
import React from 'react';
import { Button } from "@momentum-ui/react";
import { AlertSuccess, AlertData } from 'alert-momentum-ui';
export default function InnerPage() {
return (
<div>
<Button
children="Show Alert"
onClick={() => {
AlertSuccess({
title: "Example",
message: "example message"
} as AlertData);
}}
color="blue"/>
<div>);
}
Demo
note: in the demo @momentum-ui/icons is not present.
License
MIT © silvio-pardo