0.1.10 • Published 3 years ago

react-rbc-alert v0.1.10

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

React Bootstrap Component - Alert

A React Bootstrap Component - Alert with Minimal Props

Installation

Run the following command to install this package.

# If you use npm:
npm install react-rbc-alert

# Or if you use Yarn:
yarn add react-rbc-alert

Usage

Here is a example of react-rbc-alert being used in React with hooks:

import React, { useState } from "react";
import Alert from "react-rbc-alert";

const App = () => {
  const [displayAlert, setDisplayAlert] = useState(true);

  return (
    <div>
      <Alert
        showAlert={displayAlert}
        showHeader
        headerContent='Test Heading'
        bodyContent='0123456789'
        variantOverride='primary'
        showDismissible
        handleOnClose={() => setDisplayAlert(false)}
      />
    </div>
  );
};

Documentation

Coming soon!

API

NameTypeDefaultDescription
showAlertbooleanfalseControls the visual state of the Alert.
showHeaderbooleanfalseControls the visual state of the Alert Header.
showDismissiblebooleanfalseRenders a properly aligned dismiss button
handleOnClosefunction()-Callback fired when alert is closed.
bodyContentstring-Render Alert Body Content
headerContentstring-Render Alert Header Content
variantOverridestringprimaryThe Alert visual variant
keyOverridenumber0Render Alert Index

Connect with us

Follow us on Twitter

0.1.10

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.7

3 years ago

0.1.9

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.5

3 years ago

0.1.0

3 years ago