UNPKG

@dynamic-labs/sdk-react-core

Version:

A React SDK for implementing wallet web3 authentication and authorization to your website.

20 lines (17 loc) 1.33 kB
'use client' import { jsxs, jsx } from 'react/jsx-runtime'; import '@dynamic-labs/sdk-api-core'; import '../../shared/logger.js'; import '@dynamic-labs/iconic'; import '@dynamic-labs/wallet-connector-core'; import 'react'; import { ReactComponent as SvgCheck } from '../../shared/assets/check.js'; import '../../context/ViewContext/ViewContext.js'; import '@dynamic-labs/wallet-book'; import '@dynamic-labs/utils'; import '../../utils/constants/colors.js'; import '../../utils/constants/values.js'; import '../../shared/consts/index.js'; import { classNames } from '../../utils/functions/classNames/classNames.js'; const Checkbox = ({ ariaLabel, checked, className = '', defaultChecked, disabled, id, name, onChange, value, }) => (jsxs("div", { className: classNames('checkbox__container', className), children: [jsx("input", { type: 'checkbox', id: id, "aria-label": ariaLabel, "aria-checked": checked, className: 'checkbox--hidden', value: value, checked: checked, name: name, disabled: disabled, defaultChecked: defaultChecked, onChange: (e) => Boolean(onChange) && (onChange === null || onChange === void 0 ? void 0 : onChange(e, e.currentTarget.value)), "data-testid": 'input-checkbox' }), jsx("div", { className: 'checkbox--visible', children: jsx(SvgCheck, { className: 'checkbox__icon' }) })] })); export { Checkbox };