Spaces:
Build error
Build error
File size: 768 Bytes
3382f47 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
import React from "react";
import tw from "tailwind-styled-components";
interface MockCheckboxProps {
isMock: boolean;
setIsMock: React.Dispatch<React.SetStateAction<boolean>>;
}
const MockCheckbox: React.FC<MockCheckboxProps> = ({ isMock, setIsMock }) => {
return (
<CheckboxWrapper>
<MockCheckboxInput
type="checkbox"
checked={isMock}
onChange={() => setIsMock(!isMock)}
/>
<span>Run mock test</span>
</CheckboxWrapper>
);
};
export default MockCheckbox;
const MockCheckboxInput = tw.input`
border
rounded
focus:border-blue-400
focus:ring
focus:ring-blue-200
focus:ring-opacity-50
`;
const CheckboxWrapper = tw.label`
flex
items-center
space-x-2
mt-2
`;
|