refactor: create Checkbox component

This commit is contained in:
Sammy Teillet
2023-04-18 17:33:39 +02:00
parent 81da0f4e03
commit a855c474a0
2 changed files with 26 additions and 3 deletions

View 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;