From 6b2c81bcf20d9464c819db82843ccf7bee2e46a2 Mon Sep 17 00:00:00 2001 From: Dominik Prokop Date: Fri, 29 Mar 2019 16:50:37 +0100 Subject: [PATCH] Fix: Bring back styles on Switch components when checked Fixed bug introduced by replacing native input with @grafana/ui/Input component. Switch's styling relies on native input checked attribute used in adjacent sibling selector. Because React based Input is wrapped in div, there was no chance for styling to work --- packages/grafana-ui/src/components/Switch/Switch.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/grafana-ui/src/components/Switch/Switch.tsx b/packages/grafana-ui/src/components/Switch/Switch.tsx index 4f534c97a3a..e2a25682519 100644 --- a/packages/grafana-ui/src/components/Switch/Switch.tsx +++ b/packages/grafana-ui/src/components/Switch/Switch.tsx @@ -1,6 +1,5 @@ import React, { PureComponent } from 'react'; import uniqueId from 'lodash/uniqueId'; -import { Input } from '@grafana/ui'; export interface Props { label: string; @@ -39,7 +38,7 @@ export class Switch extends PureComponent {