Add call ended page and redirect
This commit is contained in:
parent
d43e85ecc2
commit
269d8d4729
8 changed files with 119 additions and 26 deletions
|
|
@ -10,7 +10,7 @@ import { ReactComponent as ScreenshareIcon } from "../icons/Screenshare.svg";
|
|||
import { useButton } from "@react-aria/button";
|
||||
import { useObjectRef } from "@react-aria/utils";
|
||||
|
||||
const variantToClassName = {
|
||||
export const variantToClassName = {
|
||||
default: [styles.button],
|
||||
toolbar: [styles.toolbarButton],
|
||||
icon: [styles.iconButton],
|
||||
|
|
@ -19,9 +19,22 @@ const variantToClassName = {
|
|||
iconCopy: [styles.iconCopyButton],
|
||||
};
|
||||
|
||||
export const sizeToClassName = {
|
||||
lg: [styles.lg],
|
||||
};
|
||||
|
||||
export const Button = forwardRef(
|
||||
(
|
||||
{ variant = "default", on, off, iconStyle, className, children, ...rest },
|
||||
{
|
||||
variant = "default",
|
||||
size,
|
||||
on,
|
||||
off,
|
||||
iconStyle,
|
||||
className,
|
||||
children,
|
||||
...rest
|
||||
},
|
||||
ref
|
||||
) => {
|
||||
const buttonRef = useObjectRef(ref);
|
||||
|
|
@ -40,6 +53,7 @@ export const Button = forwardRef(
|
|||
<button
|
||||
className={classNames(
|
||||
variantToClassName[variant],
|
||||
sizeToClassName[size],
|
||||
styles[iconStyle],
|
||||
className,
|
||||
{
|
||||
|
|
|
|||
|
|
@ -172,3 +172,7 @@ limitations under the License.
|
|||
fill: transparent;
|
||||
stroke: #0dbd8b;
|
||||
}
|
||||
|
||||
.lg {
|
||||
height: 40px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,18 @@
|
|||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import classNames from "classnames";
|
||||
import styles from "./Button.module.css";
|
||||
import { variantToClassName, sizeToClassName } from "./Button";
|
||||
|
||||
export function LinkButton({ className, children, ...rest }) {
|
||||
export function LinkButton({ className, variant, size, children, ...rest }) {
|
||||
return (
|
||||
<Link className={classNames(styles.secondary, className)} {...rest}>
|
||||
<Link
|
||||
className={classNames(
|
||||
variantToClassName[variant || "secondary"],
|
||||
sizeToClassName[size],
|
||||
className
|
||||
)}
|
||||
{...rest}
|
||||
>
|
||||
{children}
|
||||
</Link>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue