Skip to content

Commit

Permalink
GOOD-181 fix pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zinchenkoivan committed Jun 21, 2024
1 parent 159bb8f commit 1d4124b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
4 changes: 2 additions & 2 deletions docs/blocks/administration/Team.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const TeamGeneral = () => {

const checkboxTheme: CheckboxTheme = {
...defaultCheckboxTheme,
checkMark: 'stroke-white',
check: 'stroke-white',
boxVariants: {
...defaultCheckboxTheme.boxVariants,
checked: {
Expand Down Expand Up @@ -459,7 +459,7 @@ export const TeamRoles = () => {

const checkboxTheme: CheckboxTheme = {
...defaultCheckboxTheme,
checkMark: 'stroke-white',
check: 'stroke-white',
boxVariants: {
...defaultCheckboxTheme.boxVariants,
checked: {
Expand Down
8 changes: 4 additions & 4 deletions src/form/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const Checkbox: FC<CheckboxProps & CheckboxRef> = forwardRef(
d={intermediatePath}
fill="transparent"
strokeWidth="1"
className={theme.checkMark.base}
className={theme.check.base}
variants={checkVariants}
style={{ pathLength, opacity }}
custom={checked}
Expand All @@ -203,9 +203,9 @@ export const Checkbox: FC<CheckboxProps & CheckboxRef> = forwardRef(
fill="transparent"
strokeWidth="1"
className={twMerge(
theme.checkMark.base,
disabled && theme.checkMark.disabled,
checked && theme.checkMark.checked
theme.check.base,
disabled && theme.check.disabled,
checked && theme.check.checked
)}
variants={checkVariants}
style={{ pathLength, opacity }}
Expand Down
37 changes: 17 additions & 20 deletions src/form/Checkbox/CheckboxTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface CheckboxTheme {
disabled: string;
checked: string;
};
checkMark: {
check: {
base: string;
disabled: string;
checked: string;
Expand Down Expand Up @@ -56,17 +56,17 @@ export interface CheckboxTheme {
const baseTheme: Partial<CheckboxTheme> = {
base: 'inline-flex items-center w-full group',
label: {
base: 'text-text-primary dark:text-waterloo light:text-charade ml-2.5 w-full',
checked: 'checked dark:text-athens-gray light:text-vulcan',
disabled: 'cursor-not-allowed dark:text-gray-600 light:text-waterloo',
base: 'dark:text-gray-400 light:text-gray-700 ml-2.5 w-full',
checked: 'checked dark:text-gray-100 light:text-gray-900',
disabled: 'cursor-not-allowed dark:text-gray-600 light:text-gray-400',
clickable: 'cursor-pointer',
sizes: {
small: 'text-sm',
medium: 'text-base',
large: 'text-lg'
}
},
checkMark: {
check: {
base: 'stroke-white',
checked: '',
disabled: 'cursor-not-allowed'
Expand Down Expand Up @@ -108,14 +108,14 @@ export const checkboxTheme: CheckboxTheme = {
'light:group-hover:transparent'
].join(' ')
},
checkMark: {
...baseTheme.checkMark,
check: {
...baseTheme.check,
base: [
baseTheme.checkMark.base,
baseTheme.check.base,
'group-hover:stroke-black light:group-hover:stroke-white'
].join(' '),
disabled: [
baseTheme.checkMark.disabled,
baseTheme.check.disabled,
'stroke-black light:stroke-white group-hover:stroke-black '
].join(' ')
},
Expand All @@ -129,21 +129,19 @@ export const checkboxTheme: CheckboxTheme = {
disabled: [
baseTheme.border.disabled,
'dark:group-hover:stroke-gray-500',
'light:group-hover:stroke-waterloo'
'light:group-hover:stroke-gray-400'
].join(' ')
},
label: {
...baseTheme.label,
base: [
baseTheme.label.base,
'dark:group-hover:text-blue-300 light:group-hover:text-blue-400'
'text-text-primary dark:group-hover:text-blue-300 light:group-hover:text-blue-400'
].join(' '),
checked: [baseTheme.label.checked, 'group-hover:text-athens-gray'].join(
' '
),
checked: [baseTheme.label.checked, 'group-hover:text-gray-100'].join(' '),
disabled: [
baseTheme.label.disabled,
'light:group-hover:text-waterloo',
'light:group-hover:text-gray-400',
'dark:group-hover:text-gray-600'
].join(' ')
},
Expand All @@ -158,11 +156,10 @@ export const checkboxTheme: CheckboxTheme = {
export const legacyCheckboxTheme: CheckboxTheme = {
...baseTheme,
checkbox: { base: [baseTheme.checkbox, 'fill-transparent'].join(' ') },
checkMark: {
base: [
baseTheme.checkMark.base,
'stroke-[var(--checkbox-check-stroke)]'
].join(' ')
check: {
base: [baseTheme.check.base, 'stroke-[var(--checkbox-check-stroke)]'].join(
' '
)
},
label: {
...baseTheme.label,
Expand Down

0 comments on commit 1d4124b

Please sign in to comment.