From af7b107f455b01e136db2211c357cc59a506139a Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 1 Jun 2022 15:47:47 -0300 Subject: mui button impl --- .../src/components/MultiActionButton.tsx | 40 ++++++++++++---------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'packages/taler-wallet-webextension/src/components/MultiActionButton.tsx') diff --git a/packages/taler-wallet-webextension/src/components/MultiActionButton.tsx b/packages/taler-wallet-webextension/src/components/MultiActionButton.tsx index c4ccaa696..3bc6ba400 100644 --- a/packages/taler-wallet-webextension/src/components/MultiActionButton.tsx +++ b/packages/taler-wallet-webextension/src/components/MultiActionButton.tsx @@ -1,16 +1,14 @@ +import { getUnpackedSettings } from "http2"; import { h, VNode } from "preact"; -import arrowDown from "../svg/chevron-down.svg"; -import { - ButtonBoxPrimary, - ButtonPrimary, - ParagraphClickable, -} from "./styled/index.js"; import { useState } from "preact/hooks"; +import { Button } from "../mui/Button.js"; +import arrowDown from "../svg/chevron-down.svg"; +import { ParagraphClickable } from "./styled/index.js"; export interface Props { label: (s: string) => VNode; actions: string[]; - onClick: (s: string) => void; + onClick: (s: string) => Promise; } /** @@ -43,9 +41,9 @@ export function MultiActionButton({ if (!canChange) { return ( - doClick(selected)}> + ); } @@ -73,40 +71,44 @@ export function MultiActionButton({ ))} )} - doClick(selected)} style={{ borderTopRightRadius: 0, borderBottomRightRadius: 0, marginRight: 0, - maxWidth: 170, + // maxWidth: 170, overflowX: "hidden", textOverflow: "ellipsis", }} > {label(selected)} - + - setOpened((s) => !s)} + ); } -- cgit v1.2.3