add enable/disable checkbox, and heading modifier

This commit is contained in:
Amruth Pillai
2020-03-25 10:07:09 +05:30
parent 25a6740c24
commit 8521b1125b
17 changed files with 335 additions and 117 deletions

19
src/shared/Checkbox.js Normal file
View File

@ -0,0 +1,19 @@
import React from 'react';
const Checkbox = ({ checked, onChange }) => {
return (
<div className="bg-white border-2 rounded border-gray-400 hover:border-gray-500 w-8 h-8 flex flex-shrink-0 justify-center items-center mr-2 focus-within:border-blue-500 cursor-pointer">
<input
type="checkbox"
className="w-8 h-8 opacity-0 absolute cursor-pointer"
checked={checked}
onChange={e => onChange(e.target.checked)}
/>
<i className="material-icons fill-current hidden text-lg font-bold text-gray-800 cursor-pointer">
check
</i>
</div>
);
};
export default Checkbox;