@@ -15,8 +15,8 @@ export default function PopoverPage() {
15
15
const [ withBackdrop , setWithBackdrop ] = useState ( false ) ;
16
16
const [ theme , setTheme ] = useState ( '' ) ;
17
17
const [ useTooltip , setUseTooltip ] = useState ( false ) ;
18
- const [ contentWidth , setContentWidth ] = useState ( '' ) ;
19
- const [ contentHeight , setContentHeight ] = useState ( '' ) ;
18
+ const [ width , setWidth ] = useState < string | null > ( null ) ;
19
+ const [ height , setHeight ] = useState < string | null > ( null ) ;
20
20
const [ content , setContent ] = useState ( 'This is the popover content' ) ;
21
21
const [ useRichContent , setUseRichContent ] = useState ( false ) ;
22
22
@@ -50,8 +50,8 @@ export default function PopoverPage() {
50
50
modal = { modal }
51
51
withBackdrop = { withBackdrop }
52
52
theme = { theme }
53
- contentWidth = { contentWidth }
54
- contentHeight = { contentHeight }
53
+ width = { width }
54
+ height = { height }
55
55
trigger = {
56
56
[
57
57
...( triggerClick ? [ 'click' ] : [ ] ) ,
@@ -182,20 +182,20 @@ export default function PopoverPage() {
182
182
rich content
183
183
</ label >
184
184
< label >
185
- Content Width:
185
+ Width:
186
186
< input
187
187
type = "text"
188
- value = { contentWidth }
189
- onChange = { ( e ) => setContentWidth ( e . target . value ) }
188
+ value = { width || '' }
189
+ onChange = { ( e ) => setWidth ( e . target . value || null ) }
190
190
placeholder = "e.g., 300px, 50%, etc."
191
191
/>
192
192
</ label >
193
193
< label >
194
- Content Height:
194
+ Height:
195
195
< input
196
196
type = "text"
197
- value = { contentHeight }
198
- onChange = { ( e ) => setContentHeight ( e . target . value ) }
197
+ value = { height || '' }
198
+ onChange = { ( e ) => setHeight ( e . target . value || null ) }
199
199
placeholder = "e.g., 200px, auto, etc."
200
200
/>
201
201
</ label >
0 commit comments