mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-05 07:44:38 +00:00
refactor: made voiceover selector in columns
This commit is contained in:
parent
3c95fa3c3e
commit
b5c8bcfa6e
1 changed files with 10 additions and 1 deletions
|
@ -56,6 +56,10 @@ const DropdownItem = ({
|
|||
);
|
||||
};
|
||||
|
||||
const DropdownTheme = {
|
||||
content: "md:grid md:grid-cols-2 xl:grid-cols-4 gap-2 w-full container",
|
||||
};
|
||||
|
||||
export const VoiceoverSelector = (props: {
|
||||
availableVoiceover: Voiceover[];
|
||||
voiceover: Voiceover;
|
||||
|
@ -66,6 +70,7 @@ export const VoiceoverSelector = (props: {
|
|||
|
||||
return (
|
||||
<Dropdown
|
||||
theme={DropdownTheme}
|
||||
label=""
|
||||
dismissOnClick={true}
|
||||
renderTrigger={() => (
|
||||
|
@ -76,9 +81,13 @@ export const VoiceoverSelector = (props: {
|
|||
>
|
||||
{props.availableVoiceover.map((voiceover: Voiceover) => (
|
||||
<Dropdown.Item
|
||||
className="w-fit"
|
||||
key={`voiceover_${voiceover.id}`}
|
||||
onClick={() => {
|
||||
playerPreferenceStore.setPreferredVoiceover(props.release_id, voiceover.name);
|
||||
playerPreferenceStore.setPreferredVoiceover(
|
||||
props.release_id,
|
||||
voiceover.name
|
||||
);
|
||||
props.setVoiceover({
|
||||
selected: voiceover,
|
||||
available: props.availableVoiceover,
|
||||
|
|
Loading…
Add table
Reference in a new issue