File tree Expand file tree Collapse file tree 2 files changed +22
-13
lines changed
wp-content/themes/pub/wporg-learn-2024/src/lesson-facilitator-notes Expand file tree Collapse file tree 2 files changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -95,19 +95,12 @@ registerBlockType( metadata.name, {
95
95
? __ ( 'Collapse Content' , 'wporg-learn' )
96
96
: __ ( 'Expand Content' , 'wporg-learn' ) }
97
97
</ Button >
98
- < div
99
- style = { {
100
- maxHeight : isExpanded ? 'none' : '100px' , // Adjust the height as needed
101
- overflow : 'hidden' ,
102
- transition : 'max-height 0.3s ease' ,
103
- } }
104
- >
105
- < RichText
106
- label = { __ ( 'Edit Lesson Plan Content' , 'wporg-learn' ) }
107
- value = { lessonPlanContent }
108
- onChange = { ( newContent ) => setAttributes ( { lessonPlanContent : newContent } ) }
109
- />
110
- </ div >
98
+ < RichText
99
+ className = { isExpanded ? 'is-expanded' : 'is-collapsed' }
100
+ label = { __ ( 'Edit Lesson Plan Content' , 'wporg-learn' ) }
101
+ value = { lessonPlanContent }
102
+ onChange = { ( newContent ) => setAttributes ( { lessonPlanContent : newContent } ) }
103
+ />
111
104
</ >
112
105
) }
113
106
{ lessonPlanId && (
Original file line number Diff line number Diff line change 1
1
.wp-block-wporg-learn-lesson-facilitator-notes {
2
+ .components-base-control__field {
3
+ margin-bottom : var (--wp--preset--spacing--10 );
4
+ }
5
+
2
6
.block-editor-rich-text__editable {
3
7
white-space : unset !important ;
8
+ overflow : scroll ;
9
+ border : 1px solid var (--wp--preset--color--charcoal-5 );
10
+ margin : var (--wp--preset--spacing--10 ) 0 ;
11
+ padding : var (--wp--preset--spacing--10 ) 0 ;
12
+
13
+ & .is-expanded {
14
+ max-height : none ;
15
+ }
16
+
17
+ & .is-collapsed {
18
+ max-height : 300px ;
19
+ }
4
20
}
5
21
}
You can’t perform that action at this time.
0 commit comments