feat: add selected file row
This commit is contained in:
parent
852c25484b
commit
2f61f1545d
31
app/components/assets/form/selected-file.tsx
Normal file
31
app/components/assets/form/selected-file.tsx
Normal file
@ -0,0 +1,31 @@
|
||||
import { FileBox, X } from 'lucide-react';
|
||||
import { Button } from '~/components/ui/button';
|
||||
import { IconTile } from '~/components/ui/icon-tile';
|
||||
import { TextPair } from '~/components/ui/text-pair';
|
||||
|
||||
interface SelectedFileProps {
|
||||
name: string;
|
||||
meta: string;
|
||||
onRemove: () => void;
|
||||
}
|
||||
|
||||
export function SelectedFile({ name, meta, onRemove }: SelectedFileProps) {
|
||||
return (
|
||||
<div className='flex items-center gap-3'>
|
||||
<IconTile icon={FileBox} size='sm' />
|
||||
<TextPair title={name} meta={meta} className='flex-1' />
|
||||
<Button
|
||||
type='button'
|
||||
variant='ghost'
|
||||
size='icon-sm'
|
||||
aria-label={`Remove ${name}`}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onRemove();
|
||||
}}
|
||||
>
|
||||
<X size={15} />
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user