MCPcopy Index your code
hub / github.com/coder/coder / NonNativeButton

Function NonNativeButton

site/src/hooks/useClickable.test.tsx:25–34  ·  view source on GitHub ↗
({
	as,
	onInteraction,
	children,
	role = "button",
})

Source from the content-addressed store, hash-verified

23 >;
24
25const NonNativeButton: FC<NonNativeButtonProps<HTMLElement>> = ({
26 as,
27 onInteraction,
28 children,
29 role = "button",
30}) => {
31 const clickableProps = useClickable(onInteraction, role);
32 const Component = as ?? "div";
33 return <Component {...clickableProps}>{children}</Component>;
34};
35
36describe(useClickable.name, () => {
37 it("Always defaults to role 'button'", () => {

Callers

nothing calls this directly

Calls 1

useClickableFunction · 0.90

Tested by

no test coverage detected