Skip to content

Commit 0dd2338

Browse files
authored
Add ScrollArea component to design system (raycast#157)
1 parent 7e96c62 commit 0dd2338

File tree

18 files changed

+333
-614
lines changed

18 files changed

+333
-614
lines changed

app/(navigation)/icon/icon-generator.module.css

+20-26
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@
299299
cursor: pointer;
300300
outline: none;
301301

302-
transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
302+
transition:
303+
color 0.3s ease-in-out,
304+
background-color 0.3s ease-in-out,
305+
border-color 0.3s ease-in-out;
303306

304307
&:hover {
305308
border-radius: 6px;
@@ -416,24 +419,17 @@
416419
}
417420
}
418421

422+
.scrollWrapper {
423+
width: calc(100% + 26px);
424+
padding: 0 13px;
425+
margin: 0 -13px;
426+
}
427+
419428
.iconsWrapper {
420-
display: flex;
421-
overflow: auto;
422-
flex-direction: row;
423-
flex-wrap: wrap;
424-
align-items: flex-start;
425-
justify-content: flex-start;
426-
padding: 0 15px 16px;
427-
margin: 0 -16px 0;
429+
display: grid;
430+
padding-bottom: 16px;
428431
gap: 8px;
429-
430-
@media (max-width: 720px) {
431-
width: 100%;
432-
padding: 0;
433-
margin: 0;
434-
gap: 4px;
435-
justify-items: space-between;
436-
}
432+
grid-template-columns: repeat(4, 1fr);
437433
}
438434

439435
.emptyIconsListIcon {
@@ -471,12 +467,13 @@
471467

472468
.icon {
473469
display: flex;
474-
width: 66px;
475-
height: 66px;
470+
width: 100%;
471+
height: auto;
476472
align-items: center;
477473
justify-content: center;
478474
padding: 10px;
479475
border-radius: 4px;
476+
aspect-ratio: 1/1;
480477

481478
background: rgba(255, 255, 255, 0.05);
482479
color: white;
@@ -495,12 +492,6 @@
495492
appearance: none;
496493
opacity: 0;
497494
}
498-
499-
@media (max-width: 720px) {
500-
width: 24%;
501-
height: auto;
502-
aspect-ratio: 1/1;
503-
}
504495
}
505496

506497
.selectedIcon {
@@ -631,7 +622,10 @@
631622
border-radius: 6px;
632623
background: #343434;
633624

634-
transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
625+
transition:
626+
color 0.3s ease-in-out,
627+
background-color 0.3s ease-in-out,
628+
border-color 0.3s ease-in-out;
635629

636630
&::placeholder {
637631
color: rgba(255, 255, 255, 0.4);

0 commit comments

Comments
 (0)