diff --git a/packages/tradershub/src/components/DemoRealSwitcher/DemoRealSwitcher.tsx b/packages/tradershub/src/components/DemoRealSwitcher/DemoRealSwitcher.tsx index 93f5a78906f7..64e9d4601475 100644 --- a/packages/tradershub/src/components/DemoRealSwitcher/DemoRealSwitcher.tsx +++ b/packages/tradershub/src/components/DemoRealSwitcher/DemoRealSwitcher.tsx @@ -1,58 +1,76 @@ +// TODO: Create a Generic component for this once the designed is finalized. import React, { useState } from 'react'; -import { Text } from '@deriv/quill-design'; +import { qtMerge, Text } from '@deriv/quill-design'; import { LabelPairedChevronDownSmRegularIcon } from '@deriv/quill-icons'; import { Listbox, Transition } from '@headlessui/react'; const accountTypes = [ - { color: 'information', label: 'Demo', value: 'demo' }, - { color: 'success', label: 'Real', value: 'real' }, + { label: 'Demo', value: 'demo' }, + { label: 'Real', value: 'real' }, ]; const DemoRealSwitcher = () => { const [selected, setSelected] = useState(accountTypes[0]); - const { color, label } = selected; + const { label, value } = selected; return (
-
- - - {label} - - - - - ( +
+ - {accountTypes?.map(account => ( - - {({ selected }) => ( - - {account.label} - - )} - - ))} - - -
+ + {label} + + + + + + {accountTypes?.map(account => ( + + {({ selected }) => ( + + {account.label} + + )} + + ))} + + +
+ )}
);