Remove console noise from Toggle component
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
const Toggle = ({ offLabel = 'off', onLabel = 'on', checked, onChange }) => {
|
const Toggle = ({ offLabel = 'off', onLabel = 'on', checked, onChange }) => {
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center text-sm cursor-pointer font-light">
|
<div className="flex items-center text-sm cursor-pointer font-light">
|
||||||
<span className={!checked && 'text-ch-gray-500'}>{offLabel}</span>
|
<span className={`${!checked && 'text-ch-gray-500'}`}>{offLabel}</span>
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
'mx-2 w-7 h-4 p-1 rounded-full border border-ch-gray-300 relative ' +
|
'mx-2 w-7 h-4 p-1 rounded-full border border-ch-gray-300 relative ' +
|
||||||
@@ -19,7 +19,7 @@ const Toggle = ({ offLabel = 'off', onLabel = 'on', checked, onChange }) => {
|
|||||||
}}
|
}}
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
<span className={checked && 'text-ch-gray-500'}>{onLabel}</span>
|
<span className={`${checked && 'text-ch-gray-500'}`}>{onLabel}</span>
|
||||||
<input
|
<input
|
||||||
className="sr-only"
|
className="sr-only"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|||||||
Reference in New Issue
Block a user