Skip to content

Commit 38a1d4a

Browse files
FWF-5716:[Feature] - Moved single variable selection modal from MF to EE
1 parent 86ffd64 commit 38a1d4a

File tree

5 files changed

+31
-300
lines changed

5 files changed

+31
-300
lines changed

forms-flow-components/src/components/CustomComponents/CustomTextArea.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ export const CustomTextArea: FC<CustomTextAreaProps> = ({
6565
<div
6666
className={`text-area-icon ${onIconClick ? "text-area-icon-clickable" : ""}`}
6767
onClick={onIconClick}
68-
role={onIconClick ? "button" : undefined}
69-
tabIndex={onIconClick ? 0 : undefined}
68+
role={onIconClick && "button"}
69+
tabIndex={onIconClick && 0 }
7070
onKeyDown={
7171
onIconClick
7272
? (e) => {

forms-flow-components/src/components/CustomComponents/ReusableStandardModal.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export interface ReusableStandardModalProps {
3535
secondaryBtnLoading?: boolean;
3636
secondoryBtndataTestid?: string;
3737
secondoryBtnariaLabel?: string;
38+
allignButtons?: boolean;
3839
}
3940

4041
const buildModalContent = (
@@ -113,6 +114,7 @@ export const ReusableStandardModal: React.FC<ReusableStandardModalProps> = ({
113114
secondaryBtnLoading,
114115
secondoryBtndataTestid,
115116
secondoryBtnariaLabel,
117+
allignButtons,
116118
}) => {
117119
const { t } = useTranslation();
118120
const darkColor = StyleServices.getCSSVariable("--secondary-dark");
@@ -190,7 +192,7 @@ export const ReusableStandardModal: React.FC<ReusableStandardModalProps> = ({
190192
)}
191193

192194
{(primaryBtnText || secondaryBtnText) && (
193-
<Modal.Footer>
195+
<Modal.Footer className={`mt-3 ${allignButtons ? "justify-content-between" : ""}`}>
194196
{secondaryBtnText && (
195197
<V8CustomButton
196198
label={t(secondaryBtnText)}

forms-flow-components/src/components/CustomComponents/SingleVariableSelectionModal.tsx

Lines changed: 0 additions & 275 deletions
This file was deleted.

forms-flow-components/src/components/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ export * from "./CustomComponents/ReusableTable";
5858
export * from "./CustomComponents/ReusableLargeModal";
5959
export * from "./CustomComponents/FormViewModal";
6060
export * from "./CustomComponents/ReusableStandardModal";
61+
<<<<<<< Updated upstream
6162
export * from "./CustomComponents/SelectWithCustomValue";
6263
export * from "./CustomComponents/SingleVariableSelectionModal";
64+
=======
65+
>>>>>>> Stashed changes
6366

forms-flow-theme/scss/v8-scss/_mixins.scss

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -346,28 +346,29 @@ $box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
346346
border-bottom: 1px solid var(--gray-x-light);
347347
}
348348

349-
.modal-footer {
350-
padding: 1rem 0;
351-
background-color: transparent;
352-
display: flex;
353-
gap: 0.5rem;
354-
border-top: none;
355-
width: 100%;
356-
align-items: center;
357-
358-
// Default: single or two buttons aligned to the right
359-
justify-content: flex-end;
360-
361-
// Only when exactly 3 elements are present, space them between
362-
// Modern browsers with :has() support
363-
&:has(> *:nth-child(3):last-child) {
364-
justify-content: space-between;
365-
}
366-
367-
// Fallback for older browsers - use data attribute
368-
&[data-three-buttons="true"] {
369-
justify-content: space-between;
370-
}
349+
350+
}
351+
.modal-footer {
352+
padding-top: 1rem;
353+
background-color: transparent;
354+
display: flex;
355+
gap: 0.5rem;
356+
border-top: none;
357+
width: 100%;
358+
align-items: center;
359+
360+
// Default: single or two buttons aligned to the right
361+
justify-content: flex-end;
362+
363+
// Only when exactly 3 elements are present, space them between
364+
// Modern browsers with :has() support
365+
&:has(> *:nth-child(3):last-child) {
366+
justify-content: space-between;
367+
}
368+
369+
// Fallback for older browsers - use data attribute
370+
&[data-three-buttons="true"] {
371+
justify-content: space-between;
371372
}
372373
}
373374
}

0 commit comments

Comments
 (0)