Skip to content

Commit

Permalink
refactor(FileInput): 重构上传输入框 uiwjs#845
Browse files Browse the repository at this point in the history
  • Loading branch information
cuilanxin committed Jul 23, 2022
1 parent 692cb3e commit d6a8d5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-file-input/src/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { FileInputWarp } from './style';
export interface InputUploadProps extends FileInputProps, InputProps {}

export default React.forwardRef<HTMLInputElement, InputUploadProps>((props, ref) => {
const { className, dataLabel = 'Browse', ...other } = props;
const cls = [className].filter(Boolean).join(' ').trim();
const { className, dataLabel = 'Browse', prefixCls = 'w-fileinput', ...other } = props;
const cls = [prefixCls, className].filter(Boolean).join(' ').trim();
return <FileInputWarp ref={ref} data-label={dataLabel} className={cls} {...other} type="file" />;
});

0 comments on commit d6a8d5d

Please sign in to comment.