Sha256: 6fff7e4408eab1ebf6227526d93378bf75455ef38d8940b27c6eef51545a563e

Contents?: true

Size: 1.47 KB

Versions: 131

Compression:

Stored size: 1.47 KB

Contents

import React, { useState } from 'react'

import Passphrase from '../../pb_passphrase/_passphrase'

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

131 entries across 131 versions & 1 rubygems

Version Path
playbook_ui-11.13.0.pre.alpha.fontawesome1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.13.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.12.1.pre.alpha.charts1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.12.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.13.0.pre.alpha.fileupload1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.12.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.11.0.pre.alpha.paginate2 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.11.0.pre.alpha.dialog2 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.11.0.pre.alpha.paginate1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.11.0.pre.alpha.renderer1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.11.0.pre.alpha.dialog1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.11.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.10.0.pre.alpha.pre.bold1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.10.0.pre.alpha.pagination1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.10.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.9.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.9.0.pre.alpha.fileupload1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.8.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.8.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-11.7.0.pre.alpha.table1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx