Sha256: f63a6111db4c50aa49b718b5e71350e964f2537b7ed25852e410ce2ddc3a6cac

Contents?: true

Size: 1.47 KB

Versions: 1788

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,788 entries across 1,788 versions & 2 rubygems

Version Path
playbook_ui-12.12.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.11.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.10.0.pre.alpha.PLAY705phonenumberreturn372 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.10.0.pre.alpha.PLAY677richtexteditorts370 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.10.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.9.1.pre.alpha.play664tiptapinvestigation353 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.9.1.pre.alpha.PLAY689bugtxtinputlabel346 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.9.1.pre.alpha.menucleanup345 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.9.1.pre.alpha.menucleanup342 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.9.1 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.9.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.8.0.pre.alpha.PLAY625phonenumberdark301 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.8.0.pre.alpha.PLAY625phonenumberdark300 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.8.0.pre.alpha.PLAY649mapkitstyles299 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.8.0.pre.alpha.PLAY645typescriptprogresstep298 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.8.0.pre.alpha.PLAY645typescriptprogresstep297 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.8.0.pre.alpha.rubyandnpmalpharelease296 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.8.0.pre.alpha.rubyandnpmalpharelease295 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.8.0.pre.alpha.rubyandnpmalpharelease294 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx
playbook_ui-12.8.0 app/pb_kits/playbook/pb_passphrase/docs/_passphrase_input_props.jsx