@zsjs/mui-components
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

title: zs-message subGroup: general

Instruction

This component was designed for displaying message prompts.

Installing

npm install @zsjs/mui-components;

Example

import { ZsMessage } from "@zsjs/mui-components";

export default function ZsMessageDemo() {
  return (
    <Button
      onClick={() => ZsMessage.success({ content: "Success", duration: 1000 })}
      variant="contained"
      color="success"
    >
      Success
    </Button>
  );
}

Methods

success, info, waring, error

params

  • content: string;
  • duration?: number;

example

[ZsMessage'demo](https://www.zsjs.fun/views/components/zs-message)

renderMessage

This function made for complex content.

params

  • content: React.ReactNode;
  • duration?: number;
  • type: success | info | warning | error

example

[ZsMessage'demo](https://www.zsjs.fun/examples/controlllers/ws-controller)

Readme

Keywords

Package Sidebar

Install

npm i @zsjs/mui-components

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

28.2 kB

Total Files

15

Last publish

Collaborators

  • squanchy1993