lynx-console 0.2.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +87 -97
- package/dist/index.css +45 -243
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +87 -97
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/components/BottomSheet.css +2 -13
- package/src/components/BottomSheet.tsx +1 -1
- package/src/components/ConsolePanel.css +0 -84
- package/src/components/ConsolePanel.tsx +3 -2
- package/src/components/FloatingButton.css +1 -8
- package/src/components/FloatingButton.tsx +29 -35
- package/src/components/LogPanel.tsx +108 -47
- package/src/components/NetworkDetailSection.tsx +24 -12
- package/src/components/NetworkPanel.css +0 -53
- package/src/components/NetworkPanel.tsx +78 -34
- package/src/components/PerformancePanel.css +0 -64
- package/src/components/PerformancePanel.tsx +120 -48
- package/src/components/Tabs.css +1 -21
- package/src/components/Tabs.tsx +2 -2
- package/src/index.tsx +11 -2
- package/src/styles/ThemeContext.ts +1 -1
- package/src/styles/theme.ts +0 -14
- package/src/styles/tokens.css +40 -0
- package/src/components/FadeList.tsx +0 -31
- package/src/styles/getDimensionValue.ts +0 -7
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { useState } from "@lynx-js/react";
|
|
2
2
|
import { stringify } from "javascript-stringify";
|
|
3
3
|
import { useThemeColors } from "../styles/ThemeContext";
|
|
4
|
-
import { type ThemeColors
|
|
4
|
+
import { fontWeight, type ThemeColors } from "../styles/theme";
|
|
5
5
|
import type { PerformanceEntryData } from "../types";
|
|
6
|
-
import { FadeList } from "./FadeList";
|
|
7
6
|
import "./PerformancePanel.css";
|
|
8
7
|
|
|
9
8
|
interface PerformancePanelProps {
|
|
@@ -66,15 +65,30 @@ const getPrimaryFcpLabel = (entry: PerformanceEntryData): string => {
|
|
|
66
65
|
function getEntryTypeColors(colors: ThemeColors, entryType: string) {
|
|
67
66
|
switch (entryType) {
|
|
68
67
|
case "init":
|
|
69
|
-
return {
|
|
68
|
+
return {
|
|
69
|
+
color: colors.palette.blue600,
|
|
70
|
+
backgroundColor: colors.palette.blue100,
|
|
71
|
+
};
|
|
70
72
|
case "metric":
|
|
71
|
-
return {
|
|
73
|
+
return {
|
|
74
|
+
color: colors.palette.green600,
|
|
75
|
+
backgroundColor: colors.palette.green100,
|
|
76
|
+
};
|
|
72
77
|
case "pipeline":
|
|
73
|
-
return {
|
|
78
|
+
return {
|
|
79
|
+
color: colors.palette.purple600,
|
|
80
|
+
backgroundColor: colors.palette.purple100,
|
|
81
|
+
};
|
|
74
82
|
case "resource":
|
|
75
|
-
return {
|
|
83
|
+
return {
|
|
84
|
+
color: colors.palette.yellow600,
|
|
85
|
+
backgroundColor: colors.palette.yellow100,
|
|
86
|
+
};
|
|
76
87
|
default:
|
|
77
|
-
return {
|
|
88
|
+
return {
|
|
89
|
+
color: colors.fg.neutral,
|
|
90
|
+
backgroundColor: colors.bg.neutralWeak,
|
|
91
|
+
};
|
|
78
92
|
}
|
|
79
93
|
}
|
|
80
94
|
|
|
@@ -92,8 +106,11 @@ export const PerformancePanel = ({
|
|
|
92
106
|
style={{ borderBottomColor: colors.stroke.neutralSubtle }}
|
|
93
107
|
>
|
|
94
108
|
<text
|
|
95
|
-
className={"pp-count"}
|
|
96
|
-
style={{
|
|
109
|
+
className={"pp-count t3"}
|
|
110
|
+
style={{
|
|
111
|
+
fontWeight: fontWeight.regular,
|
|
112
|
+
color: colors.fg.neutralSubtle,
|
|
113
|
+
}}
|
|
97
114
|
>
|
|
98
115
|
0 entries
|
|
99
116
|
</text>
|
|
@@ -103,8 +120,11 @@ export const PerformancePanel = ({
|
|
|
103
120
|
style={{ backgroundColor: colors.bg.neutralWeak }}
|
|
104
121
|
>
|
|
105
122
|
<text
|
|
106
|
-
className={"pp-clearButtonText"}
|
|
107
|
-
style={{
|
|
123
|
+
className={"pp-clearButtonText t3"}
|
|
124
|
+
style={{
|
|
125
|
+
fontWeight: fontWeight.medium,
|
|
126
|
+
color: colors.fg.neutralMuted,
|
|
127
|
+
}}
|
|
108
128
|
>
|
|
109
129
|
🗑
|
|
110
130
|
</text>
|
|
@@ -112,8 +132,11 @@ export const PerformancePanel = ({
|
|
|
112
132
|
</view>
|
|
113
133
|
<view className={"pp-placeholder"}>
|
|
114
134
|
<text
|
|
115
|
-
className={"pp-placeholderText"}
|
|
116
|
-
style={{
|
|
135
|
+
className={"pp-placeholderText t4"}
|
|
136
|
+
style={{
|
|
137
|
+
fontWeight: fontWeight.regular,
|
|
138
|
+
color: colors.fg.disabled,
|
|
139
|
+
}}
|
|
117
140
|
>
|
|
118
141
|
No performance data yet...
|
|
119
142
|
</text>
|
|
@@ -129,8 +152,11 @@ export const PerformancePanel = ({
|
|
|
129
152
|
style={{ borderBottomColor: colors.stroke.neutralSubtle }}
|
|
130
153
|
>
|
|
131
154
|
<text
|
|
132
|
-
className={"pp-count"}
|
|
133
|
-
style={{
|
|
155
|
+
className={"pp-count t3"}
|
|
156
|
+
style={{
|
|
157
|
+
fontWeight: fontWeight.regular,
|
|
158
|
+
color: colors.fg.neutralSubtle,
|
|
159
|
+
}}
|
|
134
160
|
>
|
|
135
161
|
{performances.length} entries
|
|
136
162
|
</text>
|
|
@@ -140,15 +166,18 @@ export const PerformancePanel = ({
|
|
|
140
166
|
style={{ backgroundColor: colors.bg.neutralWeak }}
|
|
141
167
|
>
|
|
142
168
|
<text
|
|
143
|
-
className={"pp-clearButtonText"}
|
|
144
|
-
style={{
|
|
169
|
+
className={"pp-clearButtonText t3"}
|
|
170
|
+
style={{
|
|
171
|
+
fontWeight: fontWeight.medium,
|
|
172
|
+
color: colors.fg.neutralMuted,
|
|
173
|
+
}}
|
|
145
174
|
>
|
|
146
175
|
🗑
|
|
147
176
|
</text>
|
|
148
177
|
</view>
|
|
149
178
|
</view>
|
|
150
179
|
|
|
151
|
-
<
|
|
180
|
+
<list scroll-orientation="vertical" className={"pp-list"}>
|
|
152
181
|
{performances.map((perf) => {
|
|
153
182
|
const isMetricFcp = isMetricFcpEntry(perf);
|
|
154
183
|
const fcpMetrics = extractFcpMetrics(perf);
|
|
@@ -168,7 +197,7 @@ export const PerformancePanel = ({
|
|
|
168
197
|
}
|
|
169
198
|
>
|
|
170
199
|
<text
|
|
171
|
-
className={"pp-entryType"}
|
|
200
|
+
className={"pp-entryType t2"}
|
|
172
201
|
style={{
|
|
173
202
|
fontWeight: fontWeight.bold,
|
|
174
203
|
...getEntryTypeColors(colors, perf.entryType),
|
|
@@ -177,14 +206,20 @@ export const PerformancePanel = ({
|
|
|
177
206
|
{perf.entryType}
|
|
178
207
|
</text>
|
|
179
208
|
<text
|
|
180
|
-
className={"pp-entryName"}
|
|
181
|
-
style={{
|
|
209
|
+
className={"pp-entryName t2"}
|
|
210
|
+
style={{
|
|
211
|
+
fontWeight: fontWeight.medium,
|
|
212
|
+
color: colors.fg.neutral,
|
|
213
|
+
}}
|
|
182
214
|
>
|
|
183
215
|
{perf.name}
|
|
184
216
|
</text>
|
|
185
217
|
<text
|
|
186
|
-
className={"pp-timestamp"}
|
|
187
|
-
style={{
|
|
218
|
+
className={"pp-timestamp t2"}
|
|
219
|
+
style={{
|
|
220
|
+
fontWeight: fontWeight.regular,
|
|
221
|
+
color: colors.fg.neutralSubtle,
|
|
222
|
+
}}
|
|
188
223
|
>
|
|
189
224
|
{new Date(perf.timestamp).toISOString()}
|
|
190
225
|
</text>
|
|
@@ -197,7 +232,7 @@ export const PerformancePanel = ({
|
|
|
197
232
|
>
|
|
198
233
|
{isMetricFcp && primaryFcp && (
|
|
199
234
|
<text
|
|
200
|
-
className={"pp-fcpHighlight"}
|
|
235
|
+
className={"pp-fcpHighlight t3"}
|
|
201
236
|
style={{
|
|
202
237
|
fontWeight: fontWeight.bold,
|
|
203
238
|
color: colors.palette.blue600,
|
|
@@ -220,21 +255,30 @@ export const PerformancePanel = ({
|
|
|
220
255
|
>
|
|
221
256
|
<view className={"pp-fcpMetricHeader"}>
|
|
222
257
|
<text
|
|
223
|
-
className={"pp-fcpMetricName"}
|
|
224
|
-
style={{
|
|
258
|
+
className={"pp-fcpMetricName t2"}
|
|
259
|
+
style={{
|
|
260
|
+
fontWeight: fontWeight.bold,
|
|
261
|
+
color: colors.fg.neutral,
|
|
262
|
+
}}
|
|
225
263
|
>
|
|
226
264
|
전체 FCP
|
|
227
265
|
</text>
|
|
228
266
|
<text
|
|
229
|
-
className={"pp-fcpMetricValue"}
|
|
230
|
-
style={{
|
|
267
|
+
className={"pp-fcpMetricValue t1"}
|
|
268
|
+
style={{
|
|
269
|
+
fontWeight: fontWeight.bold,
|
|
270
|
+
color: colors.palette.blue600,
|
|
271
|
+
}}
|
|
231
272
|
>
|
|
232
273
|
{formatDuration(totalFcp.duration)}
|
|
233
274
|
</text>
|
|
234
275
|
</view>
|
|
235
276
|
<text
|
|
236
|
-
className={"pp-fcpMetricDescription"}
|
|
237
|
-
style={{
|
|
277
|
+
className={"pp-fcpMetricDescription t3"}
|
|
278
|
+
style={{
|
|
279
|
+
fontWeight: fontWeight.regular,
|
|
280
|
+
color: colors.fg.neutralSubtle,
|
|
281
|
+
}}
|
|
238
282
|
>
|
|
239
283
|
PrepareTemplate Start부터 Paint End 까지 걸리는
|
|
240
284
|
시간
|
|
@@ -249,21 +293,30 @@ export const PerformancePanel = ({
|
|
|
249
293
|
>
|
|
250
294
|
<view className={"pp-fcpMetricHeader"}>
|
|
251
295
|
<text
|
|
252
|
-
className={"pp-fcpMetricName"}
|
|
253
|
-
style={{
|
|
296
|
+
className={"pp-fcpMetricName t2"}
|
|
297
|
+
style={{
|
|
298
|
+
fontWeight: fontWeight.bold,
|
|
299
|
+
color: colors.fg.neutral,
|
|
300
|
+
}}
|
|
254
301
|
>
|
|
255
302
|
LynxFCP
|
|
256
303
|
</text>
|
|
257
304
|
<text
|
|
258
|
-
className={"pp-fcpMetricValue"}
|
|
259
|
-
style={{
|
|
305
|
+
className={"pp-fcpMetricValue t1"}
|
|
306
|
+
style={{
|
|
307
|
+
fontWeight: fontWeight.bold,
|
|
308
|
+
color: colors.palette.blue600,
|
|
309
|
+
}}
|
|
260
310
|
>
|
|
261
311
|
{formatDuration(lynxFcp.duration)}
|
|
262
312
|
</text>
|
|
263
313
|
</view>
|
|
264
314
|
<text
|
|
265
|
-
className={"pp-fcpMetricDescription"}
|
|
266
|
-
style={{
|
|
315
|
+
className={"pp-fcpMetricDescription t3"}
|
|
316
|
+
style={{
|
|
317
|
+
fontWeight: fontWeight.regular,
|
|
318
|
+
color: colors.fg.neutralSubtle,
|
|
319
|
+
}}
|
|
267
320
|
>
|
|
268
321
|
Bundle Load 시작부터 Paint End 까지 걸리는 시간
|
|
269
322
|
</text>
|
|
@@ -277,21 +330,30 @@ export const PerformancePanel = ({
|
|
|
277
330
|
>
|
|
278
331
|
<view className={"pp-fcpMetricHeader"}>
|
|
279
332
|
<text
|
|
280
|
-
className={"pp-fcpMetricName"}
|
|
281
|
-
style={{
|
|
333
|
+
className={"pp-fcpMetricName t2"}
|
|
334
|
+
style={{
|
|
335
|
+
fontWeight: fontWeight.bold,
|
|
336
|
+
color: colors.fg.neutral,
|
|
337
|
+
}}
|
|
282
338
|
>
|
|
283
339
|
렌더링 FCP
|
|
284
340
|
</text>
|
|
285
341
|
<text
|
|
286
|
-
className={"pp-fcpMetricValue"}
|
|
287
|
-
style={{
|
|
342
|
+
className={"pp-fcpMetricValue t1"}
|
|
343
|
+
style={{
|
|
344
|
+
fontWeight: fontWeight.bold,
|
|
345
|
+
color: colors.palette.blue600,
|
|
346
|
+
}}
|
|
288
347
|
>
|
|
289
348
|
{formatDuration(fcp.duration)}
|
|
290
349
|
</text>
|
|
291
350
|
</view>
|
|
292
351
|
<text
|
|
293
|
-
className={"pp-fcpMetricDescription"}
|
|
294
|
-
style={{
|
|
352
|
+
className={"pp-fcpMetricDescription t3"}
|
|
353
|
+
style={{
|
|
354
|
+
fontWeight: fontWeight.regular,
|
|
355
|
+
color: colors.fg.neutralSubtle,
|
|
356
|
+
}}
|
|
295
357
|
>
|
|
296
358
|
TemplateBundle 준비부터 Paint End 까지 걸리는 시간
|
|
297
359
|
</text>
|
|
@@ -306,16 +368,26 @@ export const PerformancePanel = ({
|
|
|
306
368
|
style={{ backgroundColor: colors.bg.neutralWeak }}
|
|
307
369
|
>
|
|
308
370
|
<text
|
|
309
|
-
className={"pp-detailTitle"}
|
|
310
|
-
style={{
|
|
371
|
+
className={"pp-detailTitle t3"}
|
|
372
|
+
style={{
|
|
373
|
+
fontWeight: fontWeight.bold,
|
|
374
|
+
color: colors.fg.neutral,
|
|
375
|
+
}}
|
|
311
376
|
>
|
|
312
377
|
Raw Entry
|
|
313
378
|
</text>
|
|
314
379
|
<text
|
|
315
|
-
className={"pp-rawEntry"}
|
|
316
|
-
style={{
|
|
380
|
+
className={"pp-rawEntry t3"}
|
|
381
|
+
style={{
|
|
382
|
+
fontWeight: fontWeight.regular,
|
|
383
|
+
color: colors.fg.neutralSubtle,
|
|
384
|
+
}}
|
|
317
385
|
>
|
|
318
|
-
{String(
|
|
386
|
+
{String(
|
|
387
|
+
stringify(perf.rawEntry, null, 2, {
|
|
388
|
+
references: true,
|
|
389
|
+
}),
|
|
390
|
+
)}
|
|
319
391
|
</text>
|
|
320
392
|
</view>
|
|
321
393
|
)}
|
|
@@ -325,7 +397,7 @@ export const PerformancePanel = ({
|
|
|
325
397
|
</list-item>
|
|
326
398
|
);
|
|
327
399
|
})}
|
|
328
|
-
</
|
|
400
|
+
</list>
|
|
329
401
|
</view>
|
|
330
402
|
);
|
|
331
403
|
};
|
package/src/components/Tabs.css
CHANGED
|
@@ -22,26 +22,6 @@
|
|
|
22
22
|
line-height: 1.375rem;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.tabs-triggerButtonText--t4 {
|
|
26
|
-
font-size: 0.875rem;
|
|
27
|
-
line-height: 1.1875rem;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.tabs-triggerButtonText--t3 {
|
|
31
|
-
font-size: 0.8125rem;
|
|
32
|
-
line-height: 1.125rem;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.tabs-triggerButtonText--t2 {
|
|
36
|
-
font-size: 0.75rem;
|
|
37
|
-
line-height: 1rem;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.tabs-triggerButtonText--t1 {
|
|
41
|
-
font-size: 0.6875rem;
|
|
42
|
-
line-height: 0.9375rem;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
25
|
.tabs-triggerIndicator {
|
|
46
26
|
position: absolute;
|
|
47
27
|
bottom: 0;
|
|
@@ -49,7 +29,7 @@
|
|
|
49
29
|
padding: 0 16px;
|
|
50
30
|
width: 100%;
|
|
51
31
|
transition: 200ms;
|
|
52
|
-
transition-timing-function: cubic-bezier(.35, 0, .35, 1);
|
|
32
|
+
transition-timing-function: cubic-bezier(0.35, 0, 0.35, 1);
|
|
53
33
|
}
|
|
54
34
|
|
|
55
35
|
.tabs-triggerIndicatorLine {
|
package/src/components/Tabs.tsx
CHANGED
|
@@ -20,7 +20,7 @@ export default function Tabs(props: TabsProps) {
|
|
|
20
20
|
const tabSize =
|
|
21
21
|
props.items.length < 4
|
|
22
22
|
? undefined
|
|
23
|
-
:
|
|
23
|
+
: `t${Math.max(1, 5 - (props.items.length - 3))}`;
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
26
|
<view className={"tabs-root"}>
|
|
@@ -50,7 +50,7 @@ export default function Tabs(props: TabsProps) {
|
|
|
50
50
|
}}
|
|
51
51
|
>
|
|
52
52
|
<text
|
|
53
|
-
className={`tabs-triggerButtonText${tabSize ? `
|
|
53
|
+
className={`tabs-triggerButtonText${tabSize ? ` ${tabSize}` : ""}`}
|
|
54
54
|
style={{
|
|
55
55
|
fontWeight: fontWeight.bold,
|
|
56
56
|
color:
|
package/src/index.tsx
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
import BottomSheet from "./components/BottomSheet.jsx";
|
|
9
9
|
import { ConsolePanel } from "./components/ConsolePanel.jsx";
|
|
10
10
|
import "./components/FloatingButton.css";
|
|
11
|
+
import "./styles/tokens.css";
|
|
11
12
|
import { FloatingButton } from "./components/FloatingButton.jsx";
|
|
12
13
|
import { usePerformance } from "./hooks/usePerformance";
|
|
13
14
|
import { ThemeProvider } from "./styles/ThemeContext";
|
|
@@ -94,8 +95,16 @@ const LynxConsole = forwardRef<LynxConsoleHandle, LynxConsoleProps>(
|
|
|
94
95
|
}}
|
|
95
96
|
>
|
|
96
97
|
<FloatingButton bindtap={handleOpenBottomSheet}>
|
|
97
|
-
<text
|
|
98
|
-
|
|
98
|
+
<text
|
|
99
|
+
className="fb-title t4"
|
|
100
|
+
style={{ fontWeight: "400", color: colors.palette.staticWhite }}
|
|
101
|
+
>
|
|
102
|
+
LynxConsole
|
|
103
|
+
</text>
|
|
104
|
+
<text
|
|
105
|
+
className="fb-subtitle t3"
|
|
106
|
+
style={{ fontWeight: "400", color: colors.palette.staticWhite }}
|
|
107
|
+
>
|
|
99
108
|
{`${latestFcp?.name ?? "FCP"}: ${latestFcp?.duration ? latestFcp.duration.toFixed(2) : "--"}ms`}
|
|
100
109
|
</text>
|
|
101
110
|
</FloatingButton>
|
package/src/styles/theme.ts
CHANGED
|
@@ -90,20 +90,6 @@ export const duration = {
|
|
|
90
90
|
d6: "300ms",
|
|
91
91
|
} as const;
|
|
92
92
|
|
|
93
|
-
export const dimension = {
|
|
94
|
-
x2: "8px",
|
|
95
|
-
x3: "12px",
|
|
96
|
-
x4: "16px",
|
|
97
|
-
x6: "24px",
|
|
98
|
-
spacingX: {
|
|
99
|
-
globalGutter: "16px",
|
|
100
|
-
},
|
|
101
|
-
} as const;
|
|
102
|
-
|
|
103
|
-
export const radius = {
|
|
104
|
-
r6: "24px",
|
|
105
|
-
} as const;
|
|
106
|
-
|
|
107
93
|
export function getColors(theme: Theme) {
|
|
108
94
|
return colorMap[theme];
|
|
109
95
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.t1 {
|
|
2
|
+
font-size: 0.6875rem;
|
|
3
|
+
line-height: 0.9375rem;
|
|
4
|
+
}
|
|
5
|
+
.t2 {
|
|
6
|
+
font-size: 0.75rem;
|
|
7
|
+
line-height: 1rem;
|
|
8
|
+
}
|
|
9
|
+
.t3 {
|
|
10
|
+
font-size: 0.8125rem;
|
|
11
|
+
line-height: 1.125rem;
|
|
12
|
+
}
|
|
13
|
+
.t4 {
|
|
14
|
+
font-size: 0.875rem;
|
|
15
|
+
line-height: 1.1875rem;
|
|
16
|
+
}
|
|
17
|
+
.t5 {
|
|
18
|
+
font-size: 1rem;
|
|
19
|
+
line-height: 1.375rem;
|
|
20
|
+
}
|
|
21
|
+
.t6 {
|
|
22
|
+
font-size: 1.125rem;
|
|
23
|
+
line-height: 1.5rem;
|
|
24
|
+
}
|
|
25
|
+
.t7 {
|
|
26
|
+
font-size: 1.25rem;
|
|
27
|
+
line-height: 1.6875rem;
|
|
28
|
+
}
|
|
29
|
+
.t8 {
|
|
30
|
+
font-size: 1.375rem;
|
|
31
|
+
line-height: 1.875rem;
|
|
32
|
+
}
|
|
33
|
+
.t9 {
|
|
34
|
+
font-size: 1.5rem;
|
|
35
|
+
line-height: 2rem;
|
|
36
|
+
}
|
|
37
|
+
.t10 {
|
|
38
|
+
font-size: 1.625rem;
|
|
39
|
+
line-height: 2.1875rem;
|
|
40
|
+
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useRef } from "@lynx-js/react";
|
|
2
|
-
import type { NodesRef } from "@lynx-js/types";
|
|
3
|
-
|
|
4
|
-
interface FadeListProps {
|
|
5
|
-
className?: string;
|
|
6
|
-
listRef?: React.RefObject<NodesRef>;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
"preload-buffer-count"?: number;
|
|
9
|
-
"initial-scroll-index"?: number;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const FadeList = ({
|
|
13
|
-
className,
|
|
14
|
-
listRef: externalListRef,
|
|
15
|
-
children,
|
|
16
|
-
...listProps
|
|
17
|
-
}: FadeListProps) => {
|
|
18
|
-
const internalListRef = useRef<NodesRef>(null);
|
|
19
|
-
const listRef = externalListRef ?? internalListRef;
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<list
|
|
23
|
-
ref={listRef}
|
|
24
|
-
scroll-orientation="vertical"
|
|
25
|
-
className={className}
|
|
26
|
-
{...listProps}
|
|
27
|
-
>
|
|
28
|
-
{children}
|
|
29
|
-
</list>
|
|
30
|
-
);
|
|
31
|
-
};
|