Просмотр исходного кода

apply swtch for TriggerEventCheckBox

itizawa 6 лет назад
Родитель
Сommit
1dca5058eb

+ 1 - 1
src/client/js/components/Admin/Notification/GlobalNotificationList.jsx

@@ -82,7 +82,7 @@ class GlobalNotificationList extends React.Component {
                     className="custom-control-input"
                     className="custom-control-input"
                     id={notification._id}
                     id={notification._id}
                     defaultChecked={notification.isEnabled}
                     defaultChecked={notification.isEnabled}
-                    onClick={e => this.toggleIsEnabled(notification)}
+                    onClick={() => this.toggleIsEnabled(notification)}
                   />
                   />
                   <label className="custom-control-label" htmlFor={notification._id} />
                   <label className="custom-control-label" htmlFor={notification._id} />
                 </div>
                 </div>

+ 3 - 3
src/client/js/components/Admin/Notification/TriggerEventCheckBox.jsx

@@ -6,15 +6,15 @@ const TriggerEventCheckBox = (props) => {
   const { t } = props;
   const { t } = props;
 
 
   return (
   return (
-    <div className="checkbox checkbox-inverse">
+    <div className="custom-control custom-switch checkbox-success">
       <input
       <input
         type="checkbox"
         type="checkbox"
+        className="custom-control-input"
         id={`trigger-event-${props.event}`}
         id={`trigger-event-${props.event}`}
-        value={props.event}
         checked={props.checked}
         checked={props.checked}
         onChange={props.onChange}
         onChange={props.onChange}
       />
       />
-      <label htmlFor={`trigger-event-${props.event}`}>
+      <label className="custom-control-label" htmlFor={`trigger-event-${props.event}`}>
         {props.children}{' '}
         {props.children}{' '}
         {t(`notification_setting.event_${props.event}`)}
         {t(`notification_setting.event_${props.event}`)}
       </label>
       </label>