Skip to content

Commit 2fd5d94

Browse files
committed
fix: remove inline styling for Grid component
1 parent b052132 commit 2fd5d94

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

src/components/Grid/index.tsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,11 @@ export type GridProps = {
1111

1212
// Main Grid component that can embed other components
1313
export default function Grid({
14-
children,
15-
columns = 3,
16-
gap = "1rem",
17-
className
14+
children,
15+
className
1816
}: GridProps): React.ReactNode {
1917
return (
20-
<div
21-
className={clsx(styles.grid, className)}
22-
style={{
23-
gridTemplateColumns: `repeat(${columns}, 1fr)`,
24-
gap: gap,
25-
}}
26-
>
18+
<div className={clsx(styles.grid, className)}>
2719
{children}
2820
</div>
2921
);

src/components/Grid/styles.module.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.grid {
22
display: flex;
33
flex-direction: column;
4+
grid-template-columns: 3;
5+
gap: 1rem;
46
}
57

68
@media (min-width: 45.063rem) {

0 commit comments

Comments
 (0)