Added feature

This commit is contained in:
Laux Dev
2026-03-04 16:26:53 +08:00
parent ed3fee5b81
commit eb37c2f6f8
8 changed files with 131 additions and 14 deletions

View File

@@ -6,7 +6,7 @@ import CloseIcon from "../icons/close";
import CheckedIcon from "../icons/switchIcons/checked";
import UnCheckedIcon from "../icons/switchIcons/unchecked";
const CustomCheckbox = ({ checked, onChange, id }) => {
const CustomCheckbox = ({ checked, setChecked, id, ...props }) => {
const [isChecked, setIsChecked] = useState(false);
return (
<>
@@ -17,8 +17,9 @@ const CustomCheckbox = ({ checked, onChange, id }) => {
checked={checked}
onChange={() => {
setIsChecked(!isChecked);
onChange;
setChecked();
}}
{...props}
/>
<label htmlFor={id} className={styles.switch}>

View File

@@ -45,3 +45,13 @@
font-weight: 400;
line-height: normal;
}
.input:disabled {
background: rgba(75, 79, 109, 0.15);
border: 1px solid #616583;
color: #85869b;
cursor: not-allowed;
pointer-events: none;
user-select: none;
}

View File

@@ -0,0 +1,27 @@
const CopyIcon = (props) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
{...props}
>
<path
d="M5.44531 4.16645C5.44531 3.82756 5.57994 3.50255 5.81957 3.26292C6.05919 3.02329 6.3842 2.88867 6.72309 2.88867H11.8342C12.1731 2.88867 12.4981 3.02329 12.7377 3.26292C12.9774 3.50255 13.112 3.82756 13.112 4.16645V9.27756C13.112 9.61645 12.9774 9.94146 12.7377 10.1811C12.4981 10.4207 12.1731 10.5553 11.8342 10.5553H6.72309C6.3842 10.5553 6.05919 10.4207 5.81957 10.1811C5.57994 9.94146 5.44531 9.61645 5.44531 9.27756V4.16645Z"
stroke="black"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M10.5553 10.5554V11.8332C10.5553 12.1721 10.4207 12.4971 10.1811 12.7368C9.94146 12.9764 9.61645 13.111 9.27756 13.111H4.16645C3.82756 13.111 3.50255 12.9764 3.26292 12.7368C3.02329 12.4971 2.88867 12.1721 2.88867 11.8332V6.72211C2.88867 6.38323 3.02329 6.05822 3.26292 5.81859C3.50255 5.57896 3.82756 5.44434 4.16645 5.44434H5.44423"
stroke="black"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
export default CopyIcon;