mirror of
https://github.com/vercel/commerce.git
synced 2025-07-24 18:51:23 +00:00
.github
.vscode
app
components
cart
grid
index.tsx
three-items.tsx
tile.tsx
icons
layout
product
carousel.tsx
label.tsx
loading-dots.tsx
logo-square.tsx
opengraph-image.tsx
price.tsx
prose.tsx
fonts
lib
.env.example
.eslintrc.js
.gitignore
.nvmrc
.prettierignore
README.md
license.md
next.config.js
package.json
pnpm-lock.yaml
postcss.config.js
prettier.config.js
tailwind.config.js
tsconfig.json
22 lines
452 B
TypeScript
22 lines
452 B
TypeScript
import clsx from 'clsx';
|
|
|
|
function Grid(props: React.ComponentProps<'ul'>) {
|
|
return (
|
|
<ul {...props} className={clsx('grid grid-flow-row gap-4', props.className)}>
|
|
{props.children}
|
|
</ul>
|
|
);
|
|
}
|
|
|
|
function GridItem(props: React.ComponentProps<'li'>) {
|
|
return (
|
|
<li {...props} className={clsx('aspect-square transition-opacity', props.className)}>
|
|
{props.children}
|
|
</li>
|
|
);
|
|
}
|
|
|
|
Grid.Item = GridItem;
|
|
|
|
export default Grid;
|