signal-desktop/ts/components/fun/base/FunItem.tsx

30 lines
661 B
TypeScript
Raw Normal View History

// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
2025-03-26 12:35:32 -07:00
import type { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
import React from 'react';
/**
* Button
*/
export type FunItemButtonProps = Readonly<{
'aria-label': string;
tabIndex: number;
2025-03-26 12:35:32 -07:00
onClick: (event: ReactMouseEvent) => void;
children: ReactNode;
}>;
export function FunItemButton(props: FunItemButtonProps): JSX.Element {
return (
<button
type="button"
className="FunItem__Button"
aria-label={props['aria-label']}
onClick={props.onClick}
tabIndex={props.tabIndex}
>
{props.children}
</button>
);
}