mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Context menu for left pane list items
This commit is contained in:
@@ -12,6 +12,7 @@ export type Props = {
|
||||
subtitle?: string | JSX.Element;
|
||||
leading?: string | JSX.Element;
|
||||
trailing?: string | JSX.Element;
|
||||
moduleClassName?: string;
|
||||
onClick?: () => void;
|
||||
onContextMenu?: (ev: React.MouseEvent<Element, MouseEvent>) => void;
|
||||
// show hover highlight,
|
||||
@@ -28,8 +29,6 @@ export type Props = {
|
||||
testId?: string;
|
||||
};
|
||||
|
||||
const getClassName = getClassNamesFor('ListTile');
|
||||
|
||||
/**
|
||||
* A single row that typically contains some text and leading/trailing icons/widgets
|
||||
*
|
||||
@@ -72,6 +71,7 @@ const ListTileImpl = React.forwardRef<HTMLButtonElement, Props>(
|
||||
subtitle,
|
||||
leading,
|
||||
trailing,
|
||||
moduleClassName,
|
||||
onClick,
|
||||
onContextMenu,
|
||||
clickable,
|
||||
@@ -85,6 +85,8 @@ const ListTileImpl = React.forwardRef<HTMLButtonElement, Props>(
|
||||
) {
|
||||
const isClickable = clickable ?? Boolean(onClick);
|
||||
|
||||
const getClassName = getClassNamesFor('ListTile', moduleClassName);
|
||||
|
||||
const rootProps = {
|
||||
className: classNames(
|
||||
getClassName(''),
|
||||
|
||||
Reference in New Issue
Block a user