Skip to content

Commit

Permalink
panel padding
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes committed Mar 4, 2025
1 parent 49bbbff commit d5d085e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/theme/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ code {
display: flex;

@media screen and (max-width: 768px) {
--panel-padding: var(--ds-size-6);

flex-direction: column;
}
}
Expand Down
4 changes: 4 additions & 0 deletions apps/theme/components/ColorPreview/ColorPreview.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
overflow-x: auto;
}

.list {
overflow-x: auto;
}

.card {
display: flex;
flex-direction: column;
Expand Down
7 changes: 6 additions & 1 deletion apps/theme/components/ColorPreview/ColorPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ export const ColorPreview = () => {
</ToggleGroup>
</div>
</div>
<div className={cl('panelRight', view === 'grid' && classes.grid)}>
<div
className={cl(
'panelRight',
view === 'grid' ? classes.grid : classes.list,
)}
>
{colors.main.map((color, index) => (
<CardWrapper key={index} color={color} />
))}
Expand Down

0 comments on commit d5d085e

Please sign in to comment.