File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,3 +83,7 @@ h4.components-menu-group__label {
8383.interface-interface-skeleton__header :has (.interact-add-interaction-popover ) {
8484 z-index : 99 !important ;
8585}
86+
87+ .interact-add-interaction-popover .components-toggle-group-control {
88+ height : auto ;
89+ }
Original file line number Diff line number Diff line change @@ -390,6 +390,7 @@ const InteractionPanel = props => {
390390 { interactionConfig . options . map ( option => {
391391 const { type, condition } = option
392392 const propsToPass = { }
393+ const optionToPass = { ...option }
393394
394395 const Tag = type === 'number' ? NumberControl
395396 : type === 'select' ? SelectControl
@@ -402,6 +403,9 @@ const InteractionPanel = props => {
402403 } else { // Default value
403404 propsToPass . checked = option . placeholder || false
404405 }
406+ // Wordpress 7.0 Compatibility
407+ // ToggleControl is messed up in Wordpress 7.0 when type prop is added.
408+ delete optionToPass . type
405409 }
406410
407411 // Conditionally display the option.
@@ -416,7 +420,7 @@ const InteractionPanel = props => {
416420
417421 return (
418422 < Tag
419- { ...option }
423+ { ...optionToPass }
420424 key = { option . name }
421425 value = { editedInteraction . options ?. [ option . name ] || '' }
422426 onChange = { value => {
Original file line number Diff line number Diff line change 6969 }
7070 }
7171}
72+
73+ /* Wordpress 7.0 compatibility */
74+
75+ // Text control losses its margin bottom.
76+ .interact-target-block-input .components-base-control__field {
77+ margin-bottom : 8px ;
78+ }
Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ const TargetSelector = props => {
204204 < FlexLayout justifyContent = "start" >
205205 { isHorizontal && targetButton }
206206 < TextControl
207+ className = "interact-target-block-input"
207208 id = "interact-target-block-input"
208209 label = { __ ( 'Block Anchor / ID' , 'interactions' ) }
209210 value = { value . value }
Original file line number Diff line number Diff line change @@ -1147,9 +1147,7 @@ const Timeline = props => {
11471147 return ! value
11481148 } )
11491149 } }
1150- >
1151- { __ ( 'Live Preview' , 'interactions' ) }
1152- </ ToggleControl >
1150+ />
11531151 ) }
11541152 </ BaseControl >
11551153 )
Original file line number Diff line number Diff line change 138138.interact-add-interaction-button-wrapper {
139139 --wp-components-color-accent : #05f ;
140140}
141+
142+ /* Wordpress 7.0 compatibility */
143+
144+ .interact-sidebar , .interact-popover {
145+ // Toggle control loses its margin bottom.
146+ .components-toggle-control {
147+ margin-bottom : 12px ;
148+ }
149+
150+ // Text control min-height changed from 30px to 40px.
151+ .components-text-control__input {
152+ min-height : 30px !important ;
153+ }
154+
155+ // Select control field loses its margin bottom.
156+ .components-select-control .components-base-control__field {
157+ margin-bottom : 8px ;
158+ }
159+
160+ .interact-property-control .components-base-control__field {
161+ margin-bottom : 8px ;
162+ }
163+ }
You can’t perform that action at this time.
0 commit comments