From e4b9f356bc0dd5db92bc42f54115c74982d7180b Mon Sep 17 00:00:00 2001 From: Bogdan Matei Date: Tue, 25 Jun 2024 17:10:36 +0300 Subject: [PATCH] Scopes: Implement radio buttons for containers with single node selection (#89674) --- .../Forms/RadioButtonList/RadioButtonDot.tsx | 5 ++- packages/grafana-ui/src/components/index.ts | 1 + .../scene/Scopes/ScopesFiltersScene.tsx | 15 ++++---- .../scene/Scopes/ScopesScene.test.tsx | 12 ++++--- .../scene/Scopes/ScopesTreeLevel.tsx | 36 ++++++++++++++----- .../scene/Scopes/testUtils.tsx | 9 ++--- 6 files changed, 54 insertions(+), 24 deletions(-) diff --git a/packages/grafana-ui/src/components/Forms/RadioButtonList/RadioButtonDot.tsx b/packages/grafana-ui/src/components/Forms/RadioButtonList/RadioButtonDot.tsx index 6567ae9b3ad..23616fa1f5a 100644 --- a/packages/grafana-ui/src/components/Forms/RadioButtonList/RadioButtonDot.tsx +++ b/packages/grafana-ui/src/components/Forms/RadioButtonList/RadioButtonDot.tsx @@ -5,7 +5,8 @@ import { GrafanaTheme2 } from '@grafana/data'; import { useStyles2 } from '../../../themes'; -export interface RadioButtonDotProps { +export interface RadioButtonDotProps + extends Omit, 'label' | 'value' | 'onChange' | 'type'> { id: string; name: string; checked?: boolean; @@ -25,12 +26,14 @@ export const RadioButtonDot = ({ disabled, description, onChange, + ...props }: RadioButtonDotProps) => { const styles = useStyles2(getStyles); return (