Sha256: f63a6111db4c50aa49b718b5e71350e964f2537b7ed25852e410ce2ddc3a6cac

Contents?: true

Size: 1.47 KB

Versions: 1513

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-2' }}
            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

1,513 entries across 1,513 versions & 2 rubygems

Version Path
playbook_ui_docs-14.6.2.pre.alpha.PBNTR667railstypeaheadformintegration4424 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-14.6.2.pre.alpha.PBNTR667railstypeaheadformintegration4424 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui_docs-14.7.0.pre.rc.17 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-14.7.0.pre.rc.17 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui_docs-14.7.0.pre.rc.16 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-14.7.0.pre.rc.16 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui_docs-14.7.0.pre.rc.15 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-14.7.0.pre.rc.15 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui_docs-14.7.0.pre.rc.14 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-14.7.0.pre.rc.14 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui_docs-14.7.0.pre.rc.13 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-14.7.0.pre.rc.13 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui_docs-14.6.2.pre.alpha.PBNTR666advancedtablefirstcolumn4406 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-14.6.2.pre.alpha.PBNTR666advancedtablefirstcolumn4406 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui_docs-14.7.0.pre.rc.12 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-14.7.0.pre.rc.12 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui_docs-14.6.2.pre.alpha.PLAY15814384 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-14.6.2.pre.alpha.PLAY15814384 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui_docs-14.6.2.pre.alpha.PBNTR633dropdownavailablepropstable4380 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-14.6.2.pre.alpha.PBNTR633dropdownavailablepropstable4380 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx