mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix(checkbox): inherit stroke in CheckboxIcon (#4811)
This commit is contained in:
parent
b2e7e04e89
commit
8af2c5d8b1
5
.changeset/dry-jobs-cough.md
Normal file
5
.changeset/dry-jobs-cough.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@heroui/checkbox": patch
|
||||
---
|
||||
|
||||
inherit stroke in CheckboxIcon (#4802)
|
||||
@ -6,24 +6,27 @@ function CheckIcon(props: CheckboxIconProps) {
|
||||
const {isSelected, disableAnimation, ...otherProps} = props;
|
||||
|
||||
return (
|
||||
<svg aria-hidden="true" role="presentation" viewBox="0 0 17 18" {...otherProps}>
|
||||
<polyline
|
||||
fill="none"
|
||||
points="1 9 7 14 15 4"
|
||||
stroke="currentColor"
|
||||
strokeDasharray={22}
|
||||
strokeDashoffset={isSelected ? 44 : 66}
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
style={
|
||||
!disableAnimation && isSelected
|
||||
? {
|
||||
transition: "stroke-dashoffset 250ms linear 0.2s",
|
||||
}
|
||||
: {}
|
||||
}
|
||||
/>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
fill="none"
|
||||
role="presentation"
|
||||
stroke="currentColor"
|
||||
strokeDasharray={22}
|
||||
strokeDashoffset={isSelected ? 44 : 66}
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
style={
|
||||
!disableAnimation && isSelected
|
||||
? {
|
||||
transition: "stroke-dashoffset 250ms linear 0.2s",
|
||||
}
|
||||
: {}
|
||||
}
|
||||
viewBox="0 0 17 18"
|
||||
{...otherProps}
|
||||
>
|
||||
<polyline points="1 9 7 14 15 4" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user