@sikka/hawa 0.0.244 → 0.0.245

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +0,0 @@
1
- import { FC, ReactNode } from "react";
2
- type TSimpleGrid = {
3
- columns: number;
4
- spacing?: number;
5
- spacingX?: number;
6
- spacingY?: number;
7
- children?: ReactNode;
8
- };
9
- declare const SimpleGrid: FC<TSimpleGrid>;
10
- export default SimpleGrid;
@@ -1,41 +0,0 @@
1
- import { useState } from "@storybook/addons"
2
- import { FC, ReactNode } from "react"
3
- import clsx from "clsx"
4
-
5
- type TSimpleGrid = {
6
- columns: number
7
- spacing?: number
8
- spacingX?: number
9
- spacingY?: number
10
- children?: ReactNode
11
- }
12
-
13
- const SimpleGrid: FC<TSimpleGrid> = ({
14
- columns = 2,
15
- spacing,
16
- spacingX,
17
- spacingY,
18
- children,
19
- ...props
20
- }) => {
21
- const cols_num = "grid-cols-" + columns
22
- const grid_spacing = "gap-" + spacing
23
- const grid_spacing_x = "gap-x-" + spacingX
24
- const grid_spacing_y = "gap-y-" + spacingY
25
-
26
- return (
27
- <div
28
- className={clsx(
29
- "grid",
30
- cols_num,
31
- spacing ?? grid_spacing,
32
- grid_spacing_x,
33
- grid_spacing_y
34
- )}
35
- >
36
- {children}
37
- </div>
38
- )
39
- }
40
-
41
- export default SimpleGrid