mirror of
https://github.com/luxfi/financial.git
synced 2026-10-30 16:55:56 +00:00
Regulated banking platform marketing site covering: - Fiat, crypto, stablecoins, digital securities - CEX, DEX, AMM - 200+ countries - Payments, treasury, and banking infrastructure Built on Next.js static export, deployed via hanzoai/spa on lux-k8s. Migrated from luxfi/bank v1-archive branch.
27 lines
1.4 KiB
JavaScript
27 lines
1.4 KiB
JavaScript
'use client';
|
|
import React, { useMemo } from 'react';
|
|
import * as RadixCheckbox from '@radix-ui/react-checkbox';
|
|
import Icon from '../Icon';
|
|
import Styled from './styles';
|
|
import { useTheme } from '../../providers/Theme';
|
|
import Text from '../Text';
|
|
const Checkbox = ({ checked = false, disabled, onChange, label, id, style, }) => {
|
|
const { theme } = useTheme();
|
|
const textColor = useMemo(() => disabled
|
|
? theme.textColor.interactive.disabled.value
|
|
: theme.textColor.layout.primary.value, [
|
|
disabled,
|
|
theme.textColor.interactive.disabled.value,
|
|
theme.textColor.layout.primary.value,
|
|
]);
|
|
const iconColor = useMemo(() => disabled
|
|
? theme.textColor.interactive.disabled.value
|
|
: theme.textColor.interactive['default-inverse'].value, [disabled, theme.textColor.interactive]);
|
|
return (React.createElement(Styled.Container, { style: style },
|
|
React.createElement(Styled.CheckboxContainer, { disabled: disabled, defaultChecked: checked, checked: checked, onCheckedChange: onChange, id: id || label },
|
|
React.createElement(RadixCheckbox.Indicator, null,
|
|
React.createElement(Icon, { variant: "check", color: iconColor, size: "xs" }))),
|
|
label && (React.createElement(Text, { as: "label", variant: "body_sm_regular", color: textColor, htmlFor: id || label }, label))));
|
|
};
|
|
export default React.memo(Checkbox);
|
|
//# sourceMappingURL=index.js.map
|