diff --git a/app/components/ListDropdown.tsx b/app/components/ListDropdown.tsx new file mode 100644 index 0000000000..2a0661e99f --- /dev/null +++ b/app/components/ListDropdown.tsx @@ -0,0 +1,64 @@ +import { Fragment, useState } from 'react' +import { Listbox, Transition } from '@headlessui/react' +import { faCheck, faChevronDown } from '@fortawesome/pro-solid-svg-icons' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' + + +interface ListDropdownProps { + list: {[key: string] : string}[]; +} +export const ListDropdown = ({ + list +}:ListDropdownProps) => { + const [selected, setSelected] = useState(list[0]) + + return ( + +
+ + {selected.name} + + + + + + {list.map((item, itemIdx) => ( + + `relative cursor-pointer select-none py-2 pl-10 pr-4 text-white ${ + active ? 'bg-brand-secondary-400' : '' + }` + } + value={item} + > + {({ selected }) => ( + <> + + {Object.values(item)[0]} + + {selected ? ( + + + ) : null} + + )} + + ))} + + +
+
+ ) +} \ No newline at end of file diff --git a/app/components/TransitionDialogue.tsx b/app/components/TransitionDialogue.tsx index 6e2d87b4c6..f897a01e8e 100644 --- a/app/components/TransitionDialogue.tsx +++ b/app/components/TransitionDialogue.tsx @@ -37,7 +37,7 @@ export const TransitionDialogue = ({ leaveFrom="opacity-100 scale-100" leaveTo="opacity-0 scale-95" > - + {title && ( { const [appUiState, dispatchAppUiState] = useContext(AppUiContext); const handleClose = ()=> { @@ -31,9 +41,11 @@ export const DialogueTTS = ()=>{ isOpen={appUiState.diagloueTts.isOpen} onClose={handleClose} > - <> - -
+
+ + + +
@@ -41,6 +53,7 @@ export const DialogueTTS = ()=>{