This package has been deprecated

Author message:

move to @the-/ui-condition ( https://github.com/the-labo/the/tree/master/packages/ui-condition#readme )

the-condition

3.0.4 • Public • Published

the-condition

Build Status npm Version JS Standard

Conditional renderer for the-components

Installation

$ npm install the-condition --save

Usage

'use strict'
 
import React from 'react'
import { TheCondition, TheConditionStyle } from 'the-condition'
 
class ExampleComponent extends React.PureComponent {
  render () {
    const value = 1
    return (
      <div>
        <TheConditionStyle/>
        <TheCondition if={value === 1}>
          <div>Will b render if the condition is true</div>
          <div>Can be multiple</div>
        </TheCondition>
        <TheCondition unless={value === 1}>
          <div>Will be rendered unless the condition is true</div>
          <div>Can be multiple</div>
        </TheCondition>
      </div>
 
    )
  }
}
 
export default ExampleComponent
 

Components

TheCondition

Conditional renderer for the-components

Props

Name Type Description Default
allOf arrayOf bool null
if bool null
someOf arrayOf bool null
unless bool null

TheConditionStyle

Style for TheCondition

Props

Name Type Description Default
options object Style options {}

License

This software is released under the MIT License.

Links

Readme

Keywords

Package Sidebar

Install

npm i the-condition

Weekly Downloads

2

Version

3.0.4

License

MIT

Unpacked Size

40.4 kB

Total Files

28

Last publish

Collaborators

  • okunishinishi