antd/lib/input#SearchProps TypeScript Examples

The following examples show how to use antd/lib/input#SearchProps. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: registerInput.ts    From plasmic with MIT License 5 votes vote down vote up
export function registerInputSearch(
  loader?: Registerable,
  customInputSearchMeta?: ComponentMeta<SearchProps>
) {
  const doRegisterComponent: typeof registerComponent = (...args) =>
    loader ? loader.registerComponent(...args) : registerComponent(...args);
  doRegisterComponent(Search, customInputSearchMeta ?? inputSearchMeta);
}
Example #2
Source File: registerInput.ts    From plasmic with MIT License 5 votes vote down vote up
inputSearchMeta: ComponentMeta<SearchProps> = {
  name: "AntdInputSearch",
  displayName: "Antd Input Search",
  props: sortProps<SearchProps>({
    ...commonHtmlAttributes,
    addonBefore: {
      type: "slot",
      hidePlaceholder: true,
    },
    allowClear: {
      type: "boolean",
      description: "If allow to remove input content with clear icon",
      defaultValueHint: false,
    },
    bordered: {
      type: "boolean",
      description: "Whether has border style",
      defaultValueHint: true,
    },
    disabled: {
      type: "boolean",
      description: "Whether the input is disabled",
      defaultValueHint: false,
    },
    enterButton: {
      type: "slot",
      hidePlaceholder: true,
    },
    id: {
      type: "string",
      description: "The ID for input",
    },
    loading: {
      type: "boolean",
      description: "Search box with loading",
      defaultValueHint: false,
    },
    maxLength: {
      type: "number",
      description: "The max length",
    },
    placeholder: {
      type: "string",
      description: "Placeholder for the input",
    },
    prefix: {
      type: "slot",
      hidePlaceholder: true,
    },
    size: {
      type: "choice",
      options: ["small", "middle", "large"],
      description: "The size of the input box",
      defaultValueHint: "middle",
    },
    suffix: {
      type: "slot",
      hidePlaceholder: true,
    },
    type: {
      type: "string",
      description: "The type of input",
    },
    value: {
      type: "string",
      editOnly: true,
      uncontrolledProp: "defaultValue",
    },
  }),
  importPath: "antd/lib/input/Search",
  importName: "Search",
  isDefaultExport: true,
  parentComponentName: "AntdInput",
}