An open API service indexing awesome lists of open source software.

https://github.com/chasefleming/react-override-ui


https://github.com/chasefleming/react-override-ui

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# react-override-ui

The goal of this library is to have a set of components that are:
* Easy to install via NPM
* Easy to override

Current UI components:
* **Modal**
* **Icon** (Uses font awesome icons. Not all icons are added. You may need to make a PR to add the ones you want if they don't exist)
* **Dropdown**
* **Menu** (only "lined" type currently supported)

In all components, you can pass an `options` object to override CSS.

For example:
```
const override = {
"borderBottom": "2px solid purple"
};
```

## Modal Example
```
import { Modal } from "react-override-ui";

this.onModalClose()}>

Modal Content Here

```

## Icon Example
```
import { Icon } from "react-override-ui";

```

## Dropdown Example
```
import { Dropdown } from "react-override-ui";

const dropdownItems = [
{
text: "Link",
icon: "link", // Icons not necessary, but are supported as menu items
clickHandler: () => // do something
},
{
text: "Preview",
icon: "eye",
clickHandler: () => // do something
}
];


{this.props.dropdownItems.map((item, index) => (

))}

```

## Menu Example
```
import { Menu } from "react-override-ui";

const menuOptions = {
type: "lined",
override: {
"borderBottom": "2px solid purple" // not necessary (example only)
}
};

{menuItemOptions.map((item, index) => (
this.setNavTab(item.url)}
/>
))}

```

## Card Example
```
import { Card } from "react-override-ui";

Card Header
Card Content

```