Calling: Lobby
This commit is contained in:
parent
358ee4ab72
commit
59a181bd30
21 changed files with 1146 additions and 388 deletions
36
ts/components/CallBackgroundBlur.tsx
Normal file
36
ts/components/CallBackgroundBlur.tsx
Normal file
|
@ -0,0 +1,36 @@
|
|||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { ColorType } from '../types/Colors';
|
||||
|
||||
export type PropsType = {
|
||||
avatarPath?: string;
|
||||
children: React.ReactNode;
|
||||
color?: ColorType;
|
||||
};
|
||||
|
||||
export const CallBackgroundBlur = ({
|
||||
avatarPath,
|
||||
children,
|
||||
color,
|
||||
}: PropsType): JSX.Element => {
|
||||
const backgroundProps = avatarPath
|
||||
? {
|
||||
style: {
|
||||
backgroundImage: `url("${avatarPath}")`,
|
||||
},
|
||||
}
|
||||
: {
|
||||
className: classNames(
|
||||
'module-calling__background',
|
||||
`module-background-color__${color || 'default'}`
|
||||
),
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="module-calling__background" {...backgroundProps} />
|
||||
<div className="module-calling__background--blur" />
|
||||
{children}
|
||||
</>
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue