mirror of
https://github.com/langgenius/dify.git
synced 2026-04-25 17:47:30 +08:00
revert: checkbox style
This commit is contained in:
parent
642aab38fd
commit
1e2ca1aa7b
@ -1,7 +1,7 @@
|
|||||||
import { RiCheckLine } from '@remixicon/react'
|
import { RiCheckLine } from '@remixicon/react'
|
||||||
|
import s from './index.module.css'
|
||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
|
|
||||||
|
|
||||||
type CheckboxProps = {
|
type CheckboxProps = {
|
||||||
checked?: boolean
|
checked?: boolean
|
||||||
onCheck?: () => void
|
onCheck?: () => void
|
||||||
@ -10,13 +10,14 @@ type CheckboxProps = {
|
|||||||
mixed?: boolean
|
mixed?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const Checkbox = ({ checked, onCheck, className, disabled }: CheckboxProps) => {
|
const Checkbox = ({ checked, onCheck, className, disabled, mixed }: CheckboxProps) => {
|
||||||
if (!checked) {
|
if (!checked) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
'w-4 h-4 rounded-[4px] bg-components-checkbox-bg-unchecked border border-components-checkbox-border hover:bg-components-checkbox-bg-unchecked-hover hover:border-components-checkbox-border-hover shadow-xs cursor-pointer',
|
'w-4 h-4 rounded-[4px] bg-components-checkbox-bg-unchecked border border-components-checkbox-border hover:bg-components-checkbox-bg-unchecked-hover hover:border-components-checkbox-border-hover shadow-xs cursor-pointer',
|
||||||
disabled && 'border-components-checkbox-border-disabled bg-components-checkbox-bg-disabled hover:border-components-checkbox-border-disabled hover:bg-components-checkbox-bg-disabled cursor-not-allowed',
|
disabled && 'border-components-checkbox-border-disabled bg-components-checkbox-bg-disabled hover:border-components-checkbox-border-disabled hover:bg-components-checkbox-bg-disabled cursor-not-allowed',
|
||||||
|
mixed && s.mixed,
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user