Skip to content

Commit 217d55b

Browse files
committed
refactor: rename onDropdownClose to onOutsideClick
1 parent d349097 commit 217d55b

15 files changed

Lines changed: 36 additions & 36 deletions

pages/calendar/simple.page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default function CalendarPage() {
1616
maxWidth="trigger"
1717
stretchHeight={true}
1818
open={true}
19-
onDropdownClose={() => {}}
19+
onOutsideClick={() => {}}
2020
onMouseDown={() => {}}
2121
trigger={null}
2222
content={

pages/date-range-picker/month-calendar-permutations.page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export default function DateRangePickerCalendarPage() {
9696
<Dropdown
9797
stretchHeight={true}
9898
open={true}
99-
onDropdownClose={() => {}}
99+
onOutsideClick={() => {}}
100100
onMouseDown={() => {}}
101101
trigger={null}
102102
content={

pages/date-range-picker/year-calendar-permutations.page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default function DateRangePickerCalendarPage() {
7676
<Dropdown
7777
stretchHeight={true}
7878
open={true}
79-
onDropdownClose={() => {}}
79+
onOutsideClick={() => {}}
8080
onMouseDown={() => {}}
8181
trigger={null}
8282
content={

pages/dropdown/common.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function SampleDropdown({ id, children }: { id: string; children: React.R
1616
</Button>
1717
}
1818
open={isOpened}
19-
onDropdownClose={() => setOpened(false)}
19+
onOutsideClick={() => setOpened(false)}
2020
content={children}
2121
/>
2222
);

pages/dropdown/fixed-container.page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function () {
3232
</button>
3333
}
3434
open={open}
35-
onDropdownClose={() => setOpen(false)}
35+
onOutsideClick={() => setOpen(false)}
3636
content={<ListContent n={5} />}
3737
minWidth={'trigger'}
3838
/>

pages/dropdown/focus-trap.page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default function DropdownScenario() {
9191
</Button>
9292
}
9393
open={isOpen}
94-
onDropdownClose={() => setIsOpen(false)}
94+
onOutsideClick={() => setIsOpen(false)}
9595
header={
9696
<div style={{ padding: 8 }}>
9797
<Button disabled={disableHeader}>header-1</Button>

pages/dropdown/interior-fitting.page.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default function DropdownScenario() {
4040
</Button>
4141
}
4242
open={openParent1}
43-
onDropdownClose={() => setOpenParent1(false)}
43+
onOutsideClick={() => setOpenParent1(false)}
4444
content={
4545
<ul className={styles.list}>
4646
<li id="childDropdown1">
@@ -53,7 +53,7 @@ export default function DropdownScenario() {
5353
</div>
5454
}
5555
open={openChild1}
56-
onDropdownClose={() => setOpenChild1(false)}
56+
onOutsideClick={() => setOpenChild1(false)}
5757
content={<ListContent n={5} withSpaces={true} repeat={8} />}
5858
/>
5959
</li>
@@ -72,7 +72,7 @@ export default function DropdownScenario() {
7272
</Button>
7373
}
7474
open={openParent2}
75-
onDropdownClose={() => setOpenParent2(false)}
75+
onOutsideClick={() => setOpenParent2(false)}
7676
content={
7777
<ul className={styles.list} style={{ overflowY: 'auto', blockSize: '100px' }}>
7878
<li id="childDropdown2">
@@ -85,7 +85,7 @@ export default function DropdownScenario() {
8585
</div>
8686
}
8787
open={openChild2}
88-
onDropdownClose={() => setOpenChild2(false)}
88+
onOutsideClick={() => setOpenChild2(false)}
8989
content={<ListContent n={5} withSpaces={true} repeat={8} />}
9090
/>
9191
</li>
@@ -104,7 +104,7 @@ export default function DropdownScenario() {
104104
</Button>
105105
}
106106
open={openParent3}
107-
onDropdownClose={() => setOpenParent3(false)}
107+
onOutsideClick={() => setOpenParent3(false)}
108108
content={
109109
<ul className={styles.list}>
110110
<li id="childDropdown3">
@@ -117,7 +117,7 @@ export default function DropdownScenario() {
117117
</div>
118118
}
119119
open={openChild3}
120-
onDropdownClose={() => setOpenChild3(false)}
120+
onOutsideClick={() => setOpenChild3(false)}
121121
content={<ListContent n={5} withSpaces={true} repeat={8} />}
122122
/>
123123
</li>
@@ -140,7 +140,7 @@ export default function DropdownScenario() {
140140
</Button>
141141
}
142142
open={openParent4}
143-
onDropdownClose={() => setOpenParent4(false)}
143+
onOutsideClick={() => setOpenParent4(false)}
144144
content={
145145
<ul className={styles.list}>
146146
<li id="childDropdown4">
@@ -153,7 +153,7 @@ export default function DropdownScenario() {
153153
</div>
154154
}
155155
open={openChild4}
156-
onDropdownClose={() => setOpenChild4(false)}
156+
onOutsideClick={() => setOpenChild4(false)}
157157
content={<ListContent n={5} withSpaces={true} repeat={8} />}
158158
/>
159159
</li>

pages/dropdown/interior-stretch-height.page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function DropdownScenario() {
4141
</Button>
4242
}
4343
open={openParent1}
44-
onDropdownClose={() => setOpenParent1(false)}
44+
onOutsideClick={() => setOpenParent1(false)}
4545
content={<ListContent n={15} withSpaces={true} repeat={20} />}
4646
/>
4747
</div>
@@ -60,7 +60,7 @@ export default function DropdownScenario() {
6060
</Button>
6161
}
6262
open={openParent2}
63-
onDropdownClose={() => setOpenParent2(false)}
63+
onOutsideClick={() => setOpenParent2(false)}
6464
content={<ListContent n={15} withSpaces={true} repeat={20} />}
6565
/>
6666
</div>
@@ -80,7 +80,7 @@ export default function DropdownScenario() {
8080
</Button>
8181
}
8282
open={openParent3}
83-
onDropdownClose={() => setOpenParent3(false)}
83+
onOutsideClick={() => setOpenParent3(false)}
8484
content={
8585
<div style={{ inlineSize: '400px' }}>
8686
<ListContent n={15} withSpaces={true} repeat={20} />

pages/dropdown/interior-with-wrapping.page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function DropdownScenario() {
3737
</Button>
3838
}
3939
open={openParent5}
40-
onDropdownClose={() => setOpenParent5(false)}
40+
onOutsideClick={() => setOpenParent5(false)}
4141
content={
4242
<ul className={styles.list}>
4343
<li id="childDropdown5">
@@ -50,7 +50,7 @@ export default function DropdownScenario() {
5050
</div>
5151
}
5252
open={openChild5}
53-
onDropdownClose={() => setOpenChild5(false)}
53+
onOutsideClick={() => setOpenChild5(false)}
5454
content={<ListContent n={5} withSpaces={true} repeat={18} />}
5555
/>
5656
</li>
@@ -73,7 +73,7 @@ export default function DropdownScenario() {
7373
</Button>
7474
}
7575
open={openParent6}
76-
onDropdownClose={() => setOpenParent6(false)}
76+
onOutsideClick={() => setOpenParent6(false)}
7777
content={
7878
<ul className={styles.list}>
7979
<li id="childDropdown6">
@@ -86,7 +86,7 @@ export default function DropdownScenario() {
8686
</div>
8787
}
8888
open={openChild6}
89-
onDropdownClose={() => setOpenChild6(false)}
89+
onOutsideClick={() => setOpenChild6(false)}
9090
content={<ListContent n={5} withSpaces={true} repeat={18} />}
9191
/>
9292
</li>

pages/dropdown/list-with-sticky-item.page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default function MultiselectPage() {
7878
<Dropdown
7979
trigger={<Button onClick={() => setOpen(!open)}>Open dropdown</Button>}
8080
open={open}
81-
onDropdownClose={() => setOpen(false)}
81+
onOutsideClick={() => setOpen(false)}
8282
expandToViewport={urlParams.expandToViewport}
8383
header={
8484
urlParams.withHeader ? (

0 commit comments

Comments
 (0)