mirror of
https://github.com/balzack/databag.git
synced 2025-04-23 18:15:19 +00:00
removing customization of audio label
This commit is contained in:
parent
6e0ddc1238
commit
260f08ce25
@ -8,18 +8,19 @@ import { IconX } from '@tabler/icons-react'
|
||||
export function AudioFile({ source, updateLabel, disabled, remove }: {source: File, updateLabel: (label: string)=>void, disabled: boolean, remove: ()=>void}) {
|
||||
const { state, actions } = useAudioFile(source);
|
||||
|
||||
const setLabel = (label: string) => {
|
||||
updateLabel(label);
|
||||
actions.setLabel(label);
|
||||
}
|
||||
useEffect(() => {
|
||||
updateLabel(state.label);
|
||||
}, [state.label]);
|
||||
|
||||
return (
|
||||
<div className={classes.asset}>
|
||||
<Image radius="sm" className={classes.thumb} src={audio} />
|
||||
<Text className={classes.label}>{ state.label }</Text>
|
||||
<ActionIcon className={classes.close} variant="subtle" disabled={disabled} onClick={remove}>
|
||||
<IconX />
|
||||
</ActionIcon>
|
||||
{ !disabled && (
|
||||
<ActionIcon className={classes.close} variant="subtle" onClick={remove}>
|
||||
<IconX />
|
||||
</ActionIcon>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
13418
app/client/web/yarn.lock
13418
app/client/web/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user