|
1 | 1 | import { ConfigProvider, Steps} from "antd";
|
2 |
| -import { BoolCodeControl } from "comps/controls/codeControl"; |
| 2 | +import { BoolCodeControl, RadiusControl } from "comps/controls/codeControl"; |
3 | 3 | import { BoolControl } from "comps/controls/boolControl";
|
4 | 4 | import { stringExposingStateControl, numberExposingStateControl } from "comps/controls/codeStateControl";
|
5 | 5 | import { ChangeEventHandlerControl } from "comps/controls/eventHandlerControl";
|
@@ -96,10 +96,19 @@ const StepsChildrenMap = {
|
96 | 96 | viewRef: RefControl<HTMLDivElement>,
|
97 | 97 | animationStyle: styleControl(AnimationStyle ,'animationStyle' ),
|
98 | 98 | showVerticalScrollbar: withDefault(BoolControl, false),
|
| 99 | + minHorizontalWidth: withDefault(RadiusControl, ''), |
99 | 100 | };
|
100 | 101 |
|
101 | 102 | let StepControlBasicComp = (function () {
|
102 | 103 | return new UICompBuilder(StepsChildrenMap, (props) => {
|
| 104 | + |
| 105 | + const ScrollWrapper = styled.div<{ $showHorizontalScroll: boolean }>` |
| 106 | + overflow-x: scroll; |
| 107 | + ::-webkit-scrollbar { |
| 108 | + display: ${props => props.$showHorizontalScroll ? "block" : "none"}; |
| 109 | + } |
| 110 | + `; |
| 111 | + |
103 | 112 | const StyledWrapper = styled.div<{ style: StepsStyleType, $animationStyle: AnimationStyleType }>`
|
104 | 113 | ${props=>props.$animationStyle}
|
105 | 114 | height: 100%;
|
@@ -176,6 +185,7 @@ let StepControlBasicComp = (function () {
|
176 | 185 | <ScrollBar
|
177 | 186 | style={{
|
178 | 187 | height: props.autoHeight ? "auto" : "100%",
|
| 188 | + minWidth: props.minHorizontalWidth, |
179 | 189 | margin: "0px",
|
180 | 190 | padding: "0px",
|
181 | 191 | }}
|
@@ -232,6 +242,18 @@ let StepControlBasicComp = (function () {
|
232 | 242 | {["layout", "both"].includes(useContext(EditorContext).editorModeStatus) && (
|
233 | 243 | <Section name={sectionNames.layout}>
|
234 | 244 | {children.autoHeight.getPropertyView()}
|
| 245 | +<<<<<<< Updated upstream |
| 246 | +======= |
| 247 | + {!children.autoHeight.getView() && ( |
| 248 | + children.showVerticalScrollbar.propertyView({ |
| 249 | + label: trans("prop.showVerticalScrollbar"), |
| 250 | + }) |
| 251 | + )} |
| 252 | + {children.minHorizontalWidth.propertyView({ |
| 253 | + label: trans("prop.minHorizontalWidth"), |
| 254 | + placeholder: '100px', |
| 255 | + })} |
| 256 | +>>>>>>> Stashed changes |
235 | 257 | {children.size.propertyView({
|
236 | 258 | label: trans("step.size"),
|
237 | 259 | radioButton: true,
|
|
0 commit comments