Context menu for left pane list items
This commit is contained in:
parent
02dedc7157
commit
f61d8f38b0
43 changed files with 1046 additions and 110 deletions
|
@ -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(''),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue