Sha256: 7469c06a02c47e328239ae7c9990e38b2704287ef4b86295fb237cdaa91b3a3c

Contents?: true

Size: 1.45 KB

Versions: 31

Compression:

Stored size: 1.45 KB

Contents

import React, { useState } from 'react'
import { Passphrase } from '../../'

const PassphraseInputProps = (props) => {
  const [input, setInput] = useState('')

  const handleChange = (e) => setInput(e.target.value)

  return (
    <>
      <div>
        <Passphrase
            inputProps={{
              name: 'my-disabled-field',
              id: 'my-value-id',
              disabled: true,
            }}
            label="Pass props directly to input kit"
            onChange={handleChange}
            value={input}
            {...props}
        />
        <Passphrase
            inputProps={{
              children: (
                <input
                    onChange={handleChange}
                    type="password"
                    value={input}
                />),
            }}
            label="Custom input"
            onChange={handleChange}
            value={input}
            {...props}
        />
        <Passphrase
            inputProps={{ name: 'my-value-name', id: 'my-value-id' }}
            label="Set name and ID for use in form libraries"
            onChange={handleChange}
            value={input}
            {...props}
        />
        <Passphrase
            confirmation
            inputProps={{ name: 'my-value-confirmation-name', id: 'my-value-confirmation-id' }}
            onChange={handleChange}
            value={input}
            {...props}
        />
      </div>
    </>
  )
}

export default PassphraseInputProps

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
playbook_ui-9.19.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.19.0.pre.alphafonts app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.18.0.flow.bin.alpha app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.18.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.17.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.16.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.15.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.15.0.pre.decouple.website1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.14.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.13.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.12.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.12.0.pre.text.addon app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.11.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.10.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.10.0.pre.date.time.stacked.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.10.0.pre.alpha2 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-9.10.0.pre.alpha1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx