Skip to content

Commit

Permalink
feat(member): add Uploader Component (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
gwansikk committed Mar 29, 2024
1 parent 65b01ec commit eb8229e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions apps/member/src/components/common/Uploader/Uploader.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { ComponentPropsWithRef, forwardRef } from 'react';
import { Input } from '@clab/design-system';
import classNames from 'classnames';

interface UploaderProps extends ComponentPropsWithRef<'input'> {
label: string;
}

const Uploader = forwardRef<HTMLInputElement, UploaderProps>(
({ label, className, ...rest }, ref) => {
return (
<Input
type="file"
ref={ref}
id={label}
label={label}
className={classNames('col-span-2 border-none', className)}
{...rest}
/>
);
},
);

export default Uploader;

0 comments on commit eb8229e

Please sign in to comment.