// Copyright 2019-2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; import classnames from 'classnames'; import * as styles from './Typography.scss'; export type Props = { children: React.ReactNode; }; export type HeadingProps = React.HTMLAttributes; export type ParagraphProps = React.HTMLAttributes & { center?: boolean; wide?: boolean; secondary?: boolean; }; export type SpanProps = React.HTMLAttributes; export const H1 = React.memo(function H1Inner({ children, className, ...rest }: Props & HeadingProps) { return (

{children}

); }); export const H2 = React.memo(function H2Inner({ children, className, ...rest }: Props & HeadingProps) { return (

{children}

); }); export const Text = React.memo(function TextInner({ children, className, center, secondary, ...rest }: Props & ParagraphProps) { return (

{children}

); }); export const Inline = React.memo(function InlineInner({ children, className, ...rest }: Props & SpanProps) { return ( {children} ); });