best-unit 1.0.9 → 1.0.10
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.
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from "preact/hooks";
|
|
2
|
-
import {
|
|
2
|
+
import { Button } from "@/components/common/button";
|
|
3
3
|
import { Recharge } from "./components/recharge";
|
|
4
4
|
import register from "preact-custom-element";
|
|
5
5
|
import { createOnlineRecharge } from "@/api";
|
|
@@ -22,9 +22,9 @@ export function BestUnit() {
|
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<div>
|
|
25
|
-
<
|
|
25
|
+
<Button onClick={() => setVisible(true)}>
|
|
26
26
|
{t("充值/转账")}
|
|
27
|
-
</
|
|
27
|
+
</Button>
|
|
28
28
|
<Recharge
|
|
29
29
|
visible={visible}
|
|
30
30
|
onClose={() => setVisible(false)}
|
|
@@ -7,7 +7,7 @@ interface ButtonProps {
|
|
|
7
7
|
children: ComponentChildren;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export function
|
|
10
|
+
export function Button({ onClick, color, children }: ButtonProps) {
|
|
11
11
|
const style = getButtonTheme(color);
|
|
12
12
|
return (
|
|
13
13
|
<button style={style} onClick={onClick} type="button">
|
|
File without changes
|