Skip to content

Commit a041c5e

Browse files
authored
#2827 Always show Action button on the next line (#2829)
Signed-off-by: Neha Gokhale <[email protected]>
1 parent 045f281 commit a041c5e

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

canvas_modules/common-canvas/src/common-properties/components/control-item/control-item.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import PropTypes from "prop-types";
1919
import { connect } from "react-redux";
2020
import classNames from "classnames";
2121
import { STATES, CARBON_ICONS, MESSAGE_KEYS } from "./../../constants/constants.js";
22-
import { ControlType } from "./../../constants/form-constants";
22+
import { ControlType, ActionType } from "./../../constants/form-constants";
2323
import Tooltip from "./../../../tooltip/tooltip.jsx";
2424
import { isEmpty, get } from "lodash";
2525
import Icon from "./../../../icons/icon.jsx";
@@ -99,7 +99,11 @@ class ControlItem extends React.Component {
9999

100100
const action = this.actionFactory.generateAction(0, this.props.control.action);
101101

102-
const className = classNames("properties-control-item", { "hide": hidden }, { "properties-ci-action-item": action });
102+
const className = classNames(
103+
"properties-control-item",
104+
{ "hide": hidden },
105+
{ "properties-ci-action-item image": action && this.props.control.action.actionType === ActionType.IMAGE }
106+
);
103107

104108
/*
105109
* <ControlItem /> should be called from every control.

canvas_modules/common-canvas/src/common-properties/components/control-item/control-item.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@
3838
}
3939

4040
.properties-ci-action-item {
41-
display: flex;
42-
justify-content: space-between;
41+
&.image {
42+
display: flex;
43+
justify-content: space-between;
44+
}
4345

4446
.properties-ci-content-container {
4547
flex-grow: 1;

0 commit comments

Comments
 (0)