File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed
packages/pluggableWidgets/rich-text-web/src/components/ModalDialog Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,10 @@ export function DialogBody(
45
45
< div
46
46
className = { classNames (
47
47
"widget-rich-text-modal-content" ,
48
- formOrientation === "vertical" ? "form-vertical" : "form-horizontal" ,
48
+ {
49
+ "form-vertical" : formOrientation === "vertical" ,
50
+ "form-horizontal" : formOrientation !== "vertical"
51
+ } ,
49
52
className
50
53
) }
51
54
>
@@ -70,7 +73,7 @@ export function FormControl(props: FormControlProps): ReactElement {
70
73
< label
71
74
htmlFor = { inputId }
72
75
id = { `${ inputId } -label` }
73
- className = { classNames ( "control-label" , formOrientation !== "vertical" && "col-sm-3" ) }
76
+ className = { classNames ( "control-label" , { "col-sm-3" : formOrientation !== "vertical" } ) }
74
77
>
75
78
{ label }
76
79
</ label >
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ export default function ImageDialog(props: ImageDialogProps): ReactElement {
131
131
} , [ imageUploadElementRef . current ] ) ;
132
132
133
133
return (
134
- < DialogContent className = { classNames ( "image-dialog" , formOrientation === "vertical" ? " form-vertical" : "" ) } >
134
+ < DialogContent className = { classNames ( "image-dialog" , { " form-vertical": formOrientation === "vertical" } ) } >
135
135
< DialogHeader onClose = { onClose } > { activeTab === "general" ? "Insert/Edit" : "Embed" } Images</ DialogHeader >
136
136
< DialogBody formOrientation = { formOrientation } >
137
137
< div ref = { imageUploadElementRef } >
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export default function LinkDialog(props: LinkDialogProps): ReactElement {
24
24
} ;
25
25
26
26
return (
27
- < DialogContent className = { classNames ( "link-dialog" , formOrientation === "vertical" ? " form-vertical" : "" ) } >
27
+ < DialogContent className = { classNames ( "link-dialog" , { " form-vertical": formOrientation === "vertical" } ) } >
28
28
< DialogHeader onClose = { onClose } > Insert/Edit Link</ DialogHeader >
29
29
< DialogBody formOrientation = { formOrientation } >
30
30
< FormControl label = "Text" formOrientation = { formOrientation } inputId = "rich-text-link-text-input" >
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ export default function VideoDialog(props: VideoDialogProps): ReactElement {
121
121
// disable embed tab if it is about modifying current video
122
122
const disableEmbed = defaultValue ?. src && defaultValue . src . length > 0 ;
123
123
return (
124
- < DialogContent className = { classNames ( "video-dialog" , formOrientation === "vertical" ? " form-vertical" : "" ) } >
124
+ < DialogContent className = { classNames ( "video-dialog" , { " form-vertical": formOrientation === "vertical" } ) } >
125
125
< DialogHeader onClose = { onClose } > { activeTab === "general" ? "Insert/Edit" : "Embed" } Media</ DialogHeader >
126
126
< DialogBody formOrientation = { formOrientation } >
127
127
< div >
You can’t perform that action at this time.
0 commit comments