1.0.27 • Published 11 months ago

react-reusable-ui v1.0.27

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

LIBRARY X

Library X is a light library of reusable React components to help you ship faster. It is still in beta and is subject to refactoring and addition of more components.

Documentation

1. Toast

Import

import { useToast, Toast } from "library-x

Usage

Call useToast as a hook and place Toast as a component in your code.

export default () => {
  const { toast, items } = useToast();

  const handleNewToast = () =>
    toast({
      bg: "blue.700",
      color: "white",
      info: "Login successful, Redirecting now",
      size: "30rem",
    });

  return (
    <div>
      <h1>Just some random text</h1>
      <Toast items={items} />
      <button onClick={handleNewToast}>New toast</button>
    </div>
  );
};

Installation

To use Libray X, install the package and its peer dependencies by running:

yarn add libray-x framer-motion react-icons

# or

npm i libray-x framer-motion react-icons
1.0.19

12 months ago

1.0.18

12 months ago

1.0.17

12 months ago

1.0.27

11 months ago

1.0.16

12 months ago

1.0.22

12 months ago

1.0.21

12 months ago

1.0.20

12 months ago

1.0.26

12 months ago

1.0.15

12 months ago

1.0.25

12 months ago

1.0.14

12 months ago

1.0.24

12 months ago

1.0.23

12 months ago

1.0.13

12 months ago

1.0.12

12 months ago

1.0.11

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago