npm.io
0.1.1 • Published 6 years ago

rdp-components

Licence
MIT
Version
0.1.1
Deps
2
Size
152 kB
Vulns
4
Weekly
0

Red Panda Components

A component library written in React.

Usage

See the docs

To use, install the package and import components:

npm install --save-prod rdp-components
import React from "react";
import { Button } from "rdp-components";

const App = () => {
  return (
    <div>
      <Button>{"A button!"}</Button>
    </div>
  );
};

Theming

Use the Theme component to apply a theme to the components.

import React from "react";
import ReactDOM from "react-dom";
import { Theme } from "rdp-components";

import MyApp from "./MyApp";

const App = () => (
  <Theme
    colours={{
      primary: "#00ADB5",
      primaryGradient: "#00B590",
      secondary: "#F8B500",
      error: "red",
      textOnPrimary: "white",
      textOnSecondary: "white",
      textOnError: "white"
    }}
  >
    <App />
  </Theme>
);

ReactDOM.render(<App />, document.getElementById("root"));
Icons

rdp-components uses Material Icons. You can find a list of all available icons here.

Keywords