Message Requests: Add new "Report spam and block" button
This commit is contained in:
parent
20e501d9f1
commit
d4dc9b8e39
33 changed files with 630 additions and 92 deletions
|
@ -9,6 +9,7 @@ import { LocalizerType } from '../types/Util';
|
|||
import { ModalHost } from './ModalHost';
|
||||
import { Theme } from '../util/theme';
|
||||
import { getClassNamesFor } from '../util/getClassNamesFor';
|
||||
import { useHasWrapped } from '../util/hooks';
|
||||
|
||||
type PropsType = {
|
||||
children: ReactNode;
|
||||
|
@ -85,19 +86,29 @@ export function Modal({
|
|||
);
|
||||
}
|
||||
|
||||
Modal.ButtonFooter = ({
|
||||
Modal.ButtonFooter = function ButtonFooter({
|
||||
children,
|
||||
moduleClassName,
|
||||
}: Readonly<{
|
||||
children: ReactNode;
|
||||
moduleClassName?: string;
|
||||
}>): ReactElement => (
|
||||
<div
|
||||
className={getClassNamesFor(
|
||||
BASE_CLASS_NAME,
|
||||
moduleClassName
|
||||
)('__button-footer')}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}>): ReactElement {
|
||||
const [ref, hasWrapped] = useHasWrapped<HTMLDivElement>();
|
||||
|
||||
const className = getClassNamesFor(
|
||||
BASE_CLASS_NAME,
|
||||
moduleClassName
|
||||
)('__button-footer');
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(
|
||||
className,
|
||||
hasWrapped ? `${className}--one-button-per-line` : undefined
|
||||
)}
|
||||
ref={ref}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue