mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 03:49:56 +08:00
feat(core): guard service (#9816)
This commit is contained in:
@@ -83,6 +83,7 @@ export const RadioGroup = memo(function RadioGroup({
|
||||
indicatorStyle,
|
||||
iconMode,
|
||||
onChange,
|
||||
disabled,
|
||||
}: RadioProps) {
|
||||
const animationTImerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||
const finalItems = useMemo(() => {
|
||||
@@ -158,6 +159,7 @@ export const RadioGroup = memo(function RadioGroup({
|
||||
className={clsx(styles.radioButtonGroup, className)}
|
||||
style={finalStyle}
|
||||
data-icon-mode={iconMode}
|
||||
disabled={disabled}
|
||||
>
|
||||
{finalItems.map(({ customRender, ...item }, index) => {
|
||||
const testId = item.testId ? { 'data-testid': item.testId } : {};
|
||||
@@ -179,6 +181,7 @@ export const RadioGroup = memo(function RadioGroup({
|
||||
style={style}
|
||||
{...testId}
|
||||
{...item.attrs}
|
||||
disabled={disabled}
|
||||
>
|
||||
<RadixRadioGroup.Indicator
|
||||
forceMount
|
||||
|
||||
@@ -25,7 +25,7 @@ export const radioButton = style({
|
||||
'&[data-state="checked"]': {
|
||||
color: cssVarV2('switch/fontColor/primary'),
|
||||
},
|
||||
'&[data-state="unchecked"]:hover': {
|
||||
'&[data-state="unchecked"]:hover:not([disabled])': {
|
||||
background: cssVarV2('switch/buttonBackground/hover'),
|
||||
},
|
||||
'[data-icon-mode=true] &': {
|
||||
|
||||
Reference in New Issue
Block a user