Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/afeiship/react-if-else

If else logic component for react.
https://github.com/afeiship/react-if-else

condition else if ife logic react

Last synced: 3 months ago
JSON representation

If else logic component for react.

Awesome Lists containing this project

README

        

# react-if-else
> If else logic component for react.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```shell
npm install -S @jswork/react-if-else
```

## usage
1. import css
```scss
@import "~@jswork/react-if-else/dist/style.css";

// or use sass
@import "~@jswork/react-if-else/dist/style.scss";
```
2. import js
```js
import Ife from '@jswork/react-if-else';
import '@jswork/react-if-else/dist/style.scss';
import { useState } from 'react';

function App() {
const [v1, setV1] = useState(false);
return (



Build Time: {BUILD_TIME}



Yes


No-----:(



Yes
No



setV1(!v1)}>Toggle

);
}

export default App;
```

## preview
- https://afeiship.github.io/react-if-else/

## license
Code released under [the MIT license](https://github.com/afeiship/react-if-else/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/react-if-else
[version-url]: https://npmjs.org/package/@jswork/react-if-else

[license-image]: https://img.shields.io/npm/l/@jswork/react-if-else
[license-url]: https://github.com/afeiship/react-if-else/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/react-if-else
[size-url]: https://github.com/afeiship/react-if-else/blob/master/dist/react-if-else.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/react-if-else
[download-url]: https://www.npmjs.com/package/@jswork/react-if-else