0.1.1 • Published 4 years ago
rdp-components v0.1.1
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.