summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/mui/Grid.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-03-11 16:18:26 -0300
committerSebastian <sebasjm@gmail.com>2022-03-11 16:18:26 -0300
commit9e7ee06ad1870339d011a0be27867cc36f94490d (patch)
treead379cfcac93b0545125ac985b2c208e37ca44b6 /packages/taler-wallet-webextension/src/mui/Grid.tsx
parentab68ecc7332281a43ce4acf28302f85a3c8f401a (diff)
downloadwallet-core-9e7ee06ad1870339d011a0be27867cc36f94490d.tar.gz
wallet-core-9e7ee06ad1870339d011a0be27867cc36f94490d.tar.bz2
wallet-core-9e7ee06ad1870339d011a0be27867cc36f94490d.zip
pending clickable
Diffstat (limited to 'packages/taler-wallet-webextension/src/mui/Grid.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/mui/Grid.tsx14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/taler-wallet-webextension/src/mui/Grid.tsx b/packages/taler-wallet-webextension/src/mui/Grid.tsx
index 345305fe1..d05b91f18 100644
--- a/packages/taler-wallet-webextension/src/mui/Grid.tsx
+++ b/packages/taler-wallet-webextension/src/mui/Grid.tsx
@@ -1,5 +1,5 @@
import { css } from "@linaria/core";
-import { h, Fragment, VNode, ComponentChildren, createContext } from "preact";
+import { h, JSX, VNode, ComponentChildren, createContext } from "preact";
import { useContext } from "preact/hooks";
import { theme } from "./style";
@@ -31,7 +31,7 @@ const zeroMinWidthStyle = css`
type GridSizes = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
type SpacingSizes = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
-export interface Props {
+export interface Props extends JSX.HTMLAttributes<HTMLDivElement> {
columns?: number | Partial<ResponsiveSize>;
container?: boolean;
item?: boolean;
@@ -226,6 +226,8 @@ export function Grid({
justifyContent,
zeroMinWidth = false,
children,
+ onClick,
+ ...rest
}: Props): VNode {
const cc = useContext(GridContext);
const columns = !cp ? cc : toResponsive(cp);
@@ -234,12 +236,7 @@ export function Grid({
const columnSpacing = csp ? toResponsive(csp) : toResponsive(spacing);
const ssize = toResponsive({ xs, md, lg, xl, sm } as any);
- console.log(ssize);
- if (container) {
- console.log(rowSpacing);
- console.log(columnSpacing);
- }
const spacingStyles = !container
? {}
: {
@@ -312,7 +309,10 @@ export function Grid({
justifyContent,
alignItems,
flexWrap: wrap,
+ cursor: onClick ? "pointer" : "inherit",
}}
+ onClick={onClick}
+ {...rest}
>
{children}
</div>