2025-02-19 17:31:33 -08:00
|
|
|
// 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';
|
2025-02-19 17:31:33 -08:00
|
|
|
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;
|
2025-02-19 17:31:33 -08:00
|
|
|
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>
|
|
|
|
);
|
|
|
|
}
|