Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/afeiship/react-if-else
- Owner: afeiship
- Created: 2018-06-09T10:42:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-07T14:24:58.000Z (5 months ago)
- Last Synced: 2024-10-12T15:20:20.426Z (3 months ago)
- Topics: condition, else, if, ife, logic, react
- Language: TypeScript
- Homepage:
- Size: 409 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