From bfbb44af038200992efa269748f08830db380468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 7 Dec 2018 17:15:46 +0100 Subject: [PATCH] transparent toggle style and new button group style --- public/app/core/components/Switch/Switch.tsx | 7 +- .../ToggleButtonGroup/ToggleButtonGroup.tsx | 36 ++-------- public/app/features/explore/Logs.tsx | 32 +++------ .../app/plugins/datasource/loki/plugin.json | 2 +- public/sass/_variables.dark.scss | 5 ++ public/sass/_variables.light.scss | 5 ++ public/sass/base/_reboot.scss | 10 +-- public/sass/components/_buttons.scss | 2 +- public/sass/components/_gf-form.scss | 8 ++- public/sass/components/_panel_logs.scss | 14 +++- public/sass/components/_switch.scss | 20 ++++-- .../sass/components/_toggle_button_group.scss | 25 +++---- public/sass/mixins/_mixins.scss | 67 ++++--------------- 13 files changed, 93 insertions(+), 140 deletions(-) diff --git a/public/app/core/components/Switch/Switch.tsx b/public/app/core/components/Switch/Switch.tsx index 46040d2307b..5cb7617c89c 100644 --- a/public/app/core/components/Switch/Switch.tsx +++ b/public/app/core/components/Switch/Switch.tsx @@ -6,6 +6,7 @@ export interface Props { checked: boolean; labelClass?: string; switchClass?: string; + transparent?: boolean; onChange: (event) => any; } @@ -24,11 +25,11 @@ export class Switch extends PureComponent { }; render() { - const { labelClass = '', switchClass = '', label, checked } = this.props; + const { labelClass = '', switchClass = '', label, checked, transparent } = this.props; const labelId = `check-${this.state.id}`; - const labelClassName = `gf-form-label ${labelClass} pointer`; - const switchClassName = `gf-form-switch ${switchClass}`; + const labelClassName = `gf-form-label ${labelClass} ${transparent ? 'gf-form-label--transparent' : ''} pointer`; + const switchClassName = `gf-form-switch ${switchClass} ${transparent ? 'gf-form-switch--transparent' : ''}`; return (