You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
820 B
30 lines
820 B
import React from "react"; |
|
import './index.css'; |
|
|
|
export default function Checkbox(props) { |
|
return ( |
|
<div> |
|
<svg className="checkbox-symbol"> |
|
<symbol id="check" viewBox="0 0 12 10"> |
|
<polyline |
|
points="1.5 6 4.5 9 10.5 1" |
|
strokeLinecap="round" |
|
strokeLinejoin="round" |
|
strokeWidth="2" |
|
></polyline> |
|
</symbol> |
|
</svg> |
|
|
|
<div className="checkbox-container"> |
|
<input className="checkbox-input" name={String("name")} id="apples" type="checkbox" checked={props.checked} /> |
|
<label className="checkbox" htmlFor="apples"> |
|
<span> |
|
<svg width="12px" height="10px"> |
|
<use xlinkHref="#check"></use> |
|
</svg> |
|
</span> |
|
</label> |
|
</div> |
|
</div> |
|
); |
|
} |