New group call experience: Call tiles (#9332)
* Add call tiles * Factor CallDuration out into a reusable component * Correct the separator character in LiveContentSummary
This commit is contained in:
parent
07a5a1dc6f
commit
ff59f68a9f
19 changed files with 606 additions and 51 deletions
|
@ -72,7 +72,7 @@ type IProps<T extends keyof JSX.IntrinsicElements> = DynamicHtmlElementProps<T>
|
|||
disabled?: boolean;
|
||||
className?: string;
|
||||
triggerOnMouseDown?: boolean;
|
||||
onClick(e?: ButtonEvent): void | Promise<void>;
|
||||
onClick: ((e: ButtonEvent) => void | Promise<void>) | null;
|
||||
};
|
||||
|
||||
interface IAccessibleButtonProps extends React.InputHTMLAttributes<Element> {
|
||||
|
@ -106,9 +106,9 @@ export default function AccessibleButton<T extends keyof JSX.IntrinsicElements>(
|
|||
newProps["disabled"] = true;
|
||||
} else {
|
||||
if (triggerOnMouseDown) {
|
||||
newProps.onMouseDown = onClick;
|
||||
newProps.onMouseDown = onClick ?? undefined;
|
||||
} else {
|
||||
newProps.onClick = onClick;
|
||||
newProps.onClick = onClick ?? undefined;
|
||||
}
|
||||
// We need to consume enter onKeyDown and space onKeyUp
|
||||
// otherwise we are risking also activating other keyboard focusable elements
|
||||
|
@ -124,7 +124,7 @@ export default function AccessibleButton<T extends keyof JSX.IntrinsicElements>(
|
|||
case KeyBindingAction.Enter:
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
return onClick(e);
|
||||
return onClick?.(e);
|
||||
case KeyBindingAction.Space:
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
@ -144,7 +144,7 @@ export default function AccessibleButton<T extends keyof JSX.IntrinsicElements>(
|
|||
case KeyBindingAction.Space:
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
return onClick(e);
|
||||
return onClick?.(e);
|
||||
default:
|
||||
onKeyUp?.(e);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue