Sha256: 2df17c7f4a27626e5e905e1e942e9befdc02ec2b9b8cd7f57b5607203d2d7536

Contents?: true

Size: 1.72 KB

Versions: 119

Compression:

Stored size: 1.72 KB

Contents

import React from 'react'
import SelectableCard from '../_selectable_card.jsx'

class SelectableCardDark extends React.Component {
  state = {
    selectedWithIconDark: true,
    selectedWithoutIconDark: true,
    unselectedDark: false,
  }

  handleSelect = (event) => {
    this.setState({
      [event.target.id]: event.target.checked,
    })
  }

  render() {
    return (
      <div className="pb--doc-demo-row">

        <SelectableCard
            checked={this.state.selectedWithIconDark}
            dark
            icon
            inputId="selectedWithIconDark"
            name="selectedWithIconDark"
            onChange={this.handleSelect}
            value="selectedWithIconDark"
        >
          {'Selected, with icon'}
        </SelectableCard>

        <SelectableCard
            checked={this.state.selectedWithoutIconDark}
            dark
            icon={false}
            inputId="selectedWithoutIconDark"
            name="selectedWithoutIconDark"
            onChange={this.handleSelect}
            value="selectedWithoutIconDark"
        >
          {'Selected, without icon'}
        </SelectableCard>

        <SelectableCard
            checked={this.state.unselectedDark}
            dark
            inputId="unselectedDark"
            name="unselectedDark"
            onChange={this.handleSelect}
            value="unselectedDark"
        >
          {'Unselected'}
        </SelectableCard>

        <SelectableCard
            dark
            disabled
            inputId="disabled_dark"
            name="disabled_dark"
            onChange={this.handleSelect}
            value="disabled_dark"
        >
          {'Unselected'}
        </SelectableCard>

      </div>
    )
  }
}

export default SelectableCardDark

Version data entries

119 entries across 119 versions & 1 rubygems

Version Path
playbook_ui-6.6.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.0.pre.alpha10 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-6.6.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-6.5.2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-6.5.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-6.5.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.1.pre.alpha8 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.1.pre.alpha7 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.1.pre.alpha6 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.1.pre.alpha5 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.1.pre.alpha4 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.1.pre.alpha3 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.1.pre.alpha2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-6.4.2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.1.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.0.pre.alpha9 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.0.pre.alpha8 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.0.pre.alpha7 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-6.4.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-7.0.0.pre.alpha6 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx