File tree Expand file tree Collapse file tree
packages/pluggableWidgets/rich-text-web/src/components/ModalDialog Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,10 @@ export function DialogBody(
4545 < div
4646 className = { classNames (
4747 "widget-rich-text-modal-content" ,
48- formOrientation === "vertical" ? "form-vertical" : "form-horizontal" ,
48+ {
49+ "form-vertical" : formOrientation === "vertical" ,
50+ "form-horizontal" : formOrientation !== "vertical"
51+ } ,
4952 className
5053 ) }
5154 >
@@ -70,7 +73,7 @@ export function FormControl(props: FormControlProps): ReactElement {
7073 < label
7174 htmlFor = { inputId }
7275 id = { `${ inputId } -label` }
73- className = { classNames ( "control-label" , formOrientation !== "vertical" && "col-sm-3" ) }
76+ className = { classNames ( "control-label" , { "col-sm-3" : formOrientation !== "vertical" } ) }
7477 >
7578 { label }
7679 </ label >
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ export default function ImageDialog(props: ImageDialogProps): ReactElement {
131131 } , [ imageUploadElementRef . current ] ) ;
132132
133133 return (
134- < DialogContent className = { classNames ( "image-dialog" , formOrientation === "vertical" ? " form-vertical" : "" ) } >
134+ < DialogContent className = { classNames ( "image-dialog" , { " form-vertical": formOrientation === "vertical" } ) } >
135135 < DialogHeader onClose = { onClose } > { activeTab === "general" ? "Insert/Edit" : "Embed" } Images</ DialogHeader >
136136 < DialogBody formOrientation = { formOrientation } >
137137 < div ref = { imageUploadElementRef } >
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export default function LinkDialog(props: LinkDialogProps): ReactElement {
2424 } ;
2525
2626 return (
27- < DialogContent className = { classNames ( "link-dialog" , formOrientation === "vertical" ? " form-vertical" : "" ) } >
27+ < DialogContent className = { classNames ( "link-dialog" , { " form-vertical": formOrientation === "vertical" } ) } >
2828 < DialogHeader onClose = { onClose } > Insert/Edit Link</ DialogHeader >
2929 < DialogBody formOrientation = { formOrientation } >
3030 < 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 {
121121 // disable embed tab if it is about modifying current video
122122 const disableEmbed = defaultValue ?. src && defaultValue . src . length > 0 ;
123123 return (
124- < DialogContent className = { classNames ( "video-dialog" , formOrientation === "vertical" ? " form-vertical" : "" ) } >
124+ < DialogContent className = { classNames ( "video-dialog" , { " form-vertical": formOrientation === "vertical" } ) } >
125125 < DialogHeader onClose = { onClose } > { activeTab === "general" ? "Insert/Edit" : "Embed" } Media</ DialogHeader >
126126 < DialogBody formOrientation = { formOrientation } >
127127 < div >
You can’t perform that action at this time.
0 commit comments