refactor: create Checkbox component
This commit is contained in:
23
front/src/components/form/Checkbox.tsx
Normal file
23
front/src/components/form/Checkbox.tsx
Normal file
@ -0,0 +1,23 @@
|
||||
import * as React from 'react';
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
type OwnProps = {
|
||||
name: string;
|
||||
id: string;
|
||||
};
|
||||
|
||||
const StyledContainer = styled.span`
|
||||
input[type='checkbox'] {
|
||||
accent-color: #1111b7;
|
||||
}
|
||||
`;
|
||||
|
||||
function Checkbox({ name, id }: OwnProps) {
|
||||
return (
|
||||
<StyledContainer>
|
||||
<input type="checkbox" id={id} name={name}></input>
|
||||
</StyledContainer>
|
||||
);
|
||||
}
|
||||
|
||||
export default Checkbox;
|
||||
Reference in New Issue
Block a user