Skip to content

Change button text of component DxcFileInput when multiple property is false #676

@DirkBaumannDXC

Description

@DirkBaumannDXC

The button text in the DxcFileInput component should be changed when the mutiple property is false.
When mutiple property is false the button text is "Select files", but should be "Select file".

The button text should be configurable.

Example:

() => {
  const [files, setFiles] = useState([]);

  const callbackFile = (files) => {
    setFiles(files);
  };

  return (
    <DxcFileInput
      label="File Input for single file"
      helperText="Please select one file"
      value={files}
      callbackFile={callbackFile}
      multiple={false}
      margin="medium"
    />
  );
}

dxcFileInput

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions