Skip to content

Commit e90cf65

Browse files
committed
chore: update Popover dev page to use width and height
1 parent 283ae24 commit e90cf65

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

dev/pages/Popover.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export default function PopoverPage() {
1515
const [withBackdrop, setWithBackdrop] = useState(false);
1616
const [theme, setTheme] = useState('');
1717
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);
2020
const [content, setContent] = useState('This is the popover content');
2121
const [useRichContent, setUseRichContent] = useState(false);
2222

@@ -50,8 +50,8 @@ export default function PopoverPage() {
5050
modal={modal}
5151
withBackdrop={withBackdrop}
5252
theme={theme}
53-
contentWidth={contentWidth}
54-
contentHeight={contentHeight}
53+
width={width}
54+
height={height}
5555
trigger={
5656
[
5757
...(triggerClick ? ['click'] : []),
@@ -182,20 +182,20 @@ export default function PopoverPage() {
182182
rich content
183183
</label>
184184
<label>
185-
Content Width:
185+
Width:
186186
<input
187187
type="text"
188-
value={contentWidth}
189-
onChange={(e) => setContentWidth(e.target.value)}
188+
value={width || ''}
189+
onChange={(e) => setWidth(e.target.value || null)}
190190
placeholder="e.g., 300px, 50%, etc."
191191
/>
192192
</label>
193193
<label>
194-
Content Height:
194+
Height:
195195
<input
196196
type="text"
197-
value={contentHeight}
198-
onChange={(e) => setContentHeight(e.target.value)}
197+
value={height || ''}
198+
onChange={(e) => setHeight(e.target.value || null)}
199199
placeholder="e.g., 200px, auto, etc."
200200
/>
201201
</label>

0 commit comments

Comments
 (0)