mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Update call lobby UI to match new designs
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import React, { MouseEventHandler, ReactNode } from 'react';
|
||||
import React, { CSSProperties, MouseEventHandler, ReactNode } from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { assert } from '../util/assert';
|
||||
@@ -17,12 +17,15 @@ export enum ButtonVariant {
|
||||
SecondaryAffirmative,
|
||||
SecondaryDestructive,
|
||||
Destructive,
|
||||
Calling,
|
||||
}
|
||||
|
||||
type PropsType = {
|
||||
className?: string;
|
||||
disabled?: boolean;
|
||||
size?: ButtonSize;
|
||||
style?: CSSProperties;
|
||||
tabIndex?: number;
|
||||
variant?: ButtonVariant;
|
||||
} & (
|
||||
| {
|
||||
@@ -64,6 +67,7 @@ const VARIANT_CLASS_NAMES = new Map<ButtonVariant, string>([
|
||||
'module-Button--secondary module-Button--secondary--destructive',
|
||||
],
|
||||
[ButtonVariant.Destructive, 'module-Button--destructive'],
|
||||
[ButtonVariant.Calling, 'module-Button--calling'],
|
||||
]);
|
||||
|
||||
export const Button = React.forwardRef<HTMLButtonElement, PropsType>(
|
||||
@@ -73,6 +77,8 @@ export const Button = React.forwardRef<HTMLButtonElement, PropsType>(
|
||||
className,
|
||||
disabled = false,
|
||||
size = ButtonSize.Medium,
|
||||
style,
|
||||
tabIndex,
|
||||
variant = ButtonVariant.Primary,
|
||||
} = props;
|
||||
const ariaLabel = props['aria-label'];
|
||||
@@ -105,6 +111,8 @@ export const Button = React.forwardRef<HTMLButtonElement, PropsType>(
|
||||
disabled={disabled}
|
||||
onClick={onClick}
|
||||
ref={ref}
|
||||
style={style}
|
||||
tabIndex={tabIndex}
|
||||
// The `type` should either be "button" or "submit", which is effectively static.
|
||||
// eslint-disable-next-line react/button-has-type
|
||||
type={type}
|
||||
|
||||
Reference in New Issue
Block a user