How to use the bpk-component-input.INPUT_TYPES.TEXT function in bpk-component-input

To help you get started, we’ve selected a few bpk-component-input examples, based on popular ways it is used in public projects.

github Skyscanner / backpack / packages / bpk-docs / src / components / IconSearchApp / IconSearchForm.js View on Github external
const IconSearchForm = props => {
  const { filterValue, onFilterChange } = props;

  return (
    <form
      onSubmit={e => e.preventDefault()}
      className={getClassName('bpkdocs-icon-search-form')}
    >
      <fieldset className={getClassName('bpkdocs-icon-search-form__fieldset')}>
        <BpkLabel htmlFor={FILTER_INPUT_ID}>Filter</BpkLabel>
        <BpkInput
          id={FILTER_INPUT_ID}
          type={INPUT_TYPES.TEXT}
          name="filter"
          value={filterValue}
          onChange={e => onFilterChange(e.target.value)}
          placeholder="Filter by name"
        />
      </fieldset>
    </form>
  );
};