Bring in line with new downloads page
Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
This commit is contained in:
7 files changed
+271
-96
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import React from 'react';
|
||||
|
||||
interface GridProps {
|
||||
children: React.ReactNode;
|
||||
elementsPerRow: number;
|
||||
gap?: string;
|
||||
}
|
||||
|
||||
export const Grid: React.FC<GridProps> = ({ children, elementsPerRow, gap }) => {
|
||||
const gridStyle = {
|
||||
display: 'grid',
|
||||
gridTemplateColumns: `repeat(${elementsPerRow}, 1fr)`,
|
||||
gap: gap || '0px'
|
||||
};
|
||||
|
||||
return <div className="grid" style={gridStyle}>{children}</div>;
|
||||
};
|
||||
|
||||
interface GridItemProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
export const GridItem: React.FC<GridItemProps> = ({ children }) => {
|
||||
return <div className="grid-item">{children}</div>;
|
||||
};
|
||||
Reference in new issue
Block a user