diff --git a/packages/grafana-ui/src/components/Switch/Switch.story.tsx b/packages/grafana-ui/src/components/Switch/Switch.story.tsx index ee78fefe4ae..76594e3272d 100644 --- a/packages/grafana-ui/src/components/Switch/Switch.story.tsx +++ b/packages/grafana-ui/src/components/Switch/Switch.story.tsx @@ -19,7 +19,6 @@ const meta: Meta = { args: { disabled: false, value: false, - transparent: false, invalid: false, }, }; @@ -29,13 +28,13 @@ export const Controlled: StoryFn = (args) => {
- +
- +
@@ -47,7 +46,6 @@ export const Controlled: StoryFn = (args) => { showLabel={true} value={args.value} disabled={args.disabled} - transparent={args.transparent} invalid={args.invalid} /> @@ -62,15 +60,7 @@ export const Uncontrolled: StoryFn = (args) => { (e: React.FormEvent) => setChecked(e.currentTarget.checked), [setChecked] ); - return ( - - ); + return ; }; export default meta; diff --git a/packages/grafana-ui/src/components/Switch/Switch.tsx b/packages/grafana-ui/src/components/Switch/Switch.tsx index b7b0d0238e8..462d517cd9b 100644 --- a/packages/grafana-ui/src/components/Switch/Switch.tsx +++ b/packages/grafana-ui/src/components/Switch/Switch.tsx @@ -9,8 +9,6 @@ import { getFocusStyles, getMouseFocusStyles } from '../../themes/mixins'; export interface Props extends Omit, 'value'> { value?: boolean; - /** Make inline switch's background and border transparent */ - transparent?: boolean; /** Show an invalid state around the input */ invalid?: boolean; } @@ -46,7 +44,10 @@ export const Switch = React.forwardRef( Switch.displayName = 'Switch'; export interface InlineSwitchProps extends Props { + /** Label to show next to the switch */ showLabel?: boolean; + /** Make inline switch's background and border transparent */ + transparent?: boolean; } export const InlineSwitch = React.forwardRef( diff --git a/public/app/features/admin/AdminFeatureTogglesTable.tsx b/public/app/features/admin/AdminFeatureTogglesTable.tsx index 3ae4d5329a7..3be88a6fe75 100644 --- a/public/app/features/admin/AdminFeatureTogglesTable.tsx +++ b/public/app/features/admin/AdminFeatureTogglesTable.tsx @@ -133,7 +133,6 @@ export function AdminFeatureTogglesTable({ featureToggles, allowEditing, onUpdat value={row.original.enabled} disabled={row.original.readOnly} onChange={(e) => handleToggleChange(row.original, e.currentTarget.checked)} - transparent={row.original.readOnly} />
);