From e5224c763052c7ee80049e6102470b7a0ffc0444 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Mon, 30 Jan 2023 15:27:00 +0800 Subject: [PATCH 1/2] update disabled state for checkbox row --- components/package.json | 2 +- .../molecules/CheckboxRow/CheckboxRow.tsx | 16 +++++++++++++--- .../reference/mdx/molecules/CheckboxRow.docs.mdx | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/components/package.json b/components/package.json index aef94b0e..2e44a793 100644 --- a/components/package.json +++ b/components/package.json @@ -1,6 +1,6 @@ { "name": "@ensdomains/thorin", - "version": "0.6.24", + "version": "0.6.25-alpha-1", "description": "A web3 native design system", "main": "./dist/index.cjs.js", "module": "./dist/index.es.js", diff --git a/components/src/components/molecules/CheckboxRow/CheckboxRow.tsx b/components/src/components/molecules/CheckboxRow/CheckboxRow.tsx index ff69326e..07d2859e 100644 --- a/components/src/components/molecules/CheckboxRow/CheckboxRow.tsx +++ b/components/src/components/molecules/CheckboxRow/CheckboxRow.tsx @@ -8,6 +8,7 @@ import { useId } from '../../../hooks/useId' export type Props = { label: string + subLabel?: string color?: Hue } & React.InputHTMLAttributes @@ -130,14 +131,18 @@ const Content = styled.div( ) export const CheckboxRow = React.forwardRef( - ({ label: title, name, color = 'blue', ...props }, ref) => { + ({ label, subLabel, name, color = 'blue', disabled, ...props }, ref) => { const defaultRef = React.useRef(null) const inputRef = ref || defaultRef const id = useId() + + const textColor = disabled ? 'grey' : 'text' + return ( ( - - {title} + + {label} + {subLabel && ( + + {subLabel} + + )} diff --git a/docs/src/reference/mdx/molecules/CheckboxRow.docs.mdx b/docs/src/reference/mdx/molecules/CheckboxRow.docs.mdx index 7e28211d..bdb342b2 100644 --- a/docs/src/reference/mdx/molecules/CheckboxRow.docs.mdx +++ b/docs/src/reference/mdx/molecules/CheckboxRow.docs.mdx @@ -8,7 +8,7 @@ import { CheckboxRow } from '@ensdomains/thorin' ``` ```tsx live=true expand=true - + ``` ## Props From 7924af530a56da42dbdcf4940bdd73661a348474 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 07:48:22 +0000 Subject: [PATCH 2/2] v0.6.25-alpha-2 --- components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/package.json b/components/package.json index 2e44a793..55bd86b9 100644 --- a/components/package.json +++ b/components/package.json @@ -1,6 +1,6 @@ { "name": "@ensdomains/thorin", - "version": "0.6.25-alpha-1", + "version": "0.6.25-alpha-2", "description": "A web3 native design system", "main": "./dist/index.cjs.js", "module": "./dist/index.es.js",