Fix the default margins of toggle switch widget (#568)

This commit is contained in:
Navaneeth Pk 2021-08-20 23:06:11 +05:30 committed by GitHub
parent c46d57edba
commit 3ad6e6b617
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -47,7 +47,7 @@ export const ToggleSwitch = ({
const toggle = () => setOn(!on)
return (
<div className="row" style={{ width, height }} onClick={() => onComponentClick(id, component)}>
<div className="row py-1" style={{ width, height }} onClick={() => onComponentClick(id, component)}>
<span className="form-check-label form-check-label col-auto" style={{color: textColor}}>{label}</span>
<div className="col">
<Switch on={on} onClick={toggle} onChange={toggleValue} />

View file

@ -421,8 +421,8 @@ export const componentTypes = [
description: 'Toggle Switch',
component: 'ToggleSwitch',
defaultSize: {
width: 150,
height: 50
width: 130,
height: 30
},
others: {
showOnDesktop: { type: 'toggle', displayName: 'Show on desktop? '},