mars-v2-frontend/src/components/Radio.tsx

28 lines
598 B
TypeScript
Raw Normal View History

Mp 2344 fund credit account flow (#145) * MP-2344: first draft for the fund account flow * tidy: refactor * fix: fixed the callback functions * fix: fixed the toast message for funding * fix: some logic fixes * feat: enabled closing of “fund account” * fix: z-1 to isolate use isolate to create a stacking context * tidy: deleted icons * MP-2344: updated the tooltip * MP-2344: new create and funding logic * MP-2344: finished AccountList UI * tidy: svg icon updates * chore: updated dependencies * feat: convert inputValues to amounts and amounts to inputValues * fix: build fix * fix: fixed imports * fix: pr updated * fix: fixed the SWR queries to not override themselves * tidy: refactor * feat: added TokenInputWithSlider * tidy: refactor TokenInputWithSlider * feat: preparations for the accountBalance calculations * fix: removed formatCurrency from store * feat: added global Coin type * tidy: refactor delete and create credit account * add useCallback to FundAccount * update api + swr * refactor naming, ssr accounts menu * wip: added static params and href to DesktopNavigation * fix: added TODO statement * add middleware to get url * feat: added scrolling to the active account * tidy: UX improvement on the accounts list * fix: updated the page params * fix: fixed the navigation * fix: fixed the getRouteParams * fix: some logic updates * fix: fixed the accountMenu view * Keep page when selecting new account * fix: fixed useParams * fix: navigation update * fix pr comments * fixed build --------- Co-authored-by: Bob van der Helm <34470358+bobthebuidlr@users.noreply.github.com>
2023-04-06 17:20:17 +00:00
import classNames from 'classnames'
interface Props {
active?: boolean
className?: string
}
export default function Radio(props: Props) {
return (
<div
className={classNames(
'group flex h-5 w-5 items-center justify-center rounded-full border',
props.active && 'border-primary',
)}
>
<span
className={classNames(
'h-3 w-3 rounded-full',
props.active
? 'bg-primary'
: 'bg-white opacity-0 transition-opacity group-hover:opacity-100',
props.className,
)}
/>
</div>
)
}