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-4.17.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.17.0.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.16.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.15.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.14.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.15.1.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.13.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.13.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.12.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.11.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.11.0.pre.alpha3 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.11.0.pre.alpha.pre.2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.10.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.10.0.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.9.0.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.9.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.8.2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.8.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.7.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx
playbook_ui-4.7.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_dark.jsx