feat: wordlists user interface
This commit is contained in:
23
src/components/ui/UploadButton.tsx
Normal file
23
src/components/ui/UploadButton.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import '@/components/ui/button.css'
|
||||
import type { DetailedHTMLProps, FC, InputHTMLAttributes } from 'react'
|
||||
import type { MergeOmitting } from '@/types/helpers'
|
||||
|
||||
export type UploadButtonProps = MergeOmitting<
|
||||
DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,
|
||||
{
|
||||
id: string
|
||||
label?: string
|
||||
}
|
||||
>
|
||||
const UploadButton: FC<UploadButtonProps> = ({ id, label, ...inputProps }) => {
|
||||
return (
|
||||
<>
|
||||
<input type="file" id={id} {...inputProps} />
|
||||
<label htmlFor={id} className={`st-rnd-button button-neutral`}>
|
||||
{label || 'Upload'}
|
||||
</label>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default UploadButton
|
||||
Reference in New Issue
Block a user