From ff466fd307d4af9bbdc26a5656bf5221df217267 Mon Sep 17 00:00:00 2001 From: Veena S Date: Tue, 2 Apr 2024 11:34:19 +0530 Subject: [PATCH] #1635 Radioset-replace custom grouping with RadioButtonGroup Signed-off-by: Veena S --- .../controls/radioset/radioset.jsx | 12 ++++++------ .../controls/radioset/radioset.scss | 18 +++--------------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/canvas_modules/common-canvas/src/common-properties/controls/radioset/radioset.jsx b/canvas_modules/common-canvas/src/common-properties/controls/radioset/radioset.jsx index d83a522584..863a0970c0 100644 --- a/canvas_modules/common-canvas/src/common-properties/controls/radioset/radioset.jsx +++ b/canvas_modules/common-canvas/src/common-properties/controls/radioset/radioset.jsx @@ -21,10 +21,9 @@ import { isEqual } from "lodash"; import * as ControlUtils from "./../../util/control-utils"; import * as ConditionsUtils from "./../../ui-conditions/conditions-utils.js"; import ValidationMessage from "./../../components/validation-message"; -import { RadioButton } from "@carbon/react"; +import { RadioButton, RadioButtonGroup } from "@carbon/react"; import classNames from "classnames"; import { STATES, UPDATE_TYPE } from "./../../constants/constants.js"; -import { ORIENTATIONS } from "./../../constants/form-constants.js"; import { v4 as uuid4 } from "uuid"; import { Information } from "@carbon/react/icons"; import Tooltip from "./../../../tooltip/tooltip.jsx"; @@ -223,12 +222,13 @@ class RadiosetControl extends React.Component {
-
{buttons} -
+
); diff --git a/canvas_modules/common-canvas/src/common-properties/controls/radioset/radioset.scss b/canvas_modules/common-canvas/src/common-properties/controls/radioset/radioset.scss index 7277f7cbb7..18e6e7abf0 100644 --- a/canvas_modules/common-canvas/src/common-properties/controls/radioset/radioset.scss +++ b/canvas_modules/common-canvas/src/common-properties/controls/radioset/radioset.scss @@ -26,24 +26,12 @@ .properties-radio-button-group { display: block; - &.horizontal { + .cds--radio-button-group--label-right { // Horizontal-long labels to wrap properly display: inline-flex; - flex-wrap: wrap; - .properties-radioset-panel { - display: flex; - height: auto; - align-items: center; - margin-bottom: 0; - } + flex-wrap: wrap; } .properties-radioset-panel { - margin-bottom: $spacing-02; - margin-right: $spacing-04; - display: flex; - justify-content: flex-start; - align-items: center; - flex-wrap: wrap; - overflow: hidden; + margin-right: $spacing-04; .cds--radio-button-wrapper{ margin-right: 0; // We removed the space between radio & tooltip to position it correctly }