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: about 2 months ago
JSON representation
If else logic component for react.
- Host: GitHub
- URL: https://github.com/afeiship/react-if-else
- Owner: afeiship
- Created: 2018-06-09T10:42:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-01-06T08:33:33.000Z (12 months ago)
- Last Synced: 2025-02-27T03:54:41.927Z (10 months ago)
- Topics: condition, else, if, ife, logic, react
- Language: TypeScript
- Homepage:
- Size: 411 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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