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

https://github.com/notprometey/react-slots


https://github.com/notprometey/react-slots

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# React slots

slots for react app. You can find a demo [here](https://notprometey.github.io/react-slots/)

[![NPM](https://img.shields.io/npm/v/@notprometey/react-slots.svg)](https://www.npmjs.com/package/@notprometey/react-slots) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save @notprometey/react-slots
```

## Usage

```tsx
import React from 'react'
import { Slot, withSlots } from '@notprometey/react-slots';

const Modal = () => {
return (


default content of default slot
default content of test slot

);
};

export default withSlots(Modal);
```

```tsx
import React from 'react'
import { Template } from '@notprometey/react-slots';

import Modal from './components/Modal';

const App = () => {
return (

content to default slot
content to test slot

);
};
```

## License

MIT © [notprometey](https://github.com/notprometey)