tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
27
pulls
pipelines
fwd refs on action Button
cozylittle.house
1 month ago
8b5c699b
dcb147ea
+8
-5
1 changed file
expand all
collapse all
unified
split
components
ActionBar
ActionButton.tsx
+8
-5
components/ActionBar/ActionButton.tsx
···
7
7
8
8
type ButtonProps = Omit<JSX.IntrinsicElements["button"], "content">;
9
9
10
10
-
export const ActionButton = (
11
11
-
_props: ButtonProps & {
10
10
+
export const ActionButton = forwardRef<
11
11
+
HTMLButtonElement,
12
12
+
ButtonProps & {
12
13
id?: string;
13
14
icon: React.ReactNode;
14
15
label: React.ReactNode;
···
19
20
subtext?: string;
20
21
labelOnMobile?: boolean;
21
22
z?: boolean;
22
22
-
},
23
23
-
) => {
23
23
+
}
24
24
+
>((_props, ref) => {
24
25
let {
25
26
id,
26
27
icon,
···
50
51
return (
51
52
<button
52
53
{...buttonProps}
54
54
+
ref={ref}
53
55
className={`
54
56
actionButton relative font-bold
55
57
rounded-md border
···
81
83
</div>
82
84
</button>
83
85
);
84
84
-
};
86
86
+
});
87
87
+
ActionButton.displayName = "ActionButton";