1 | import * as React from 'react';
|
2 | import * as PropTypes from 'prop-types';
|
3 | import { HeadingProps as ReakitHeadingProps } from 'reakit/ts/Heading/Heading';
|
4 |
|
5 | import { ToastTitle as _ToastTitle } from './styled';
|
6 |
|
7 | export type LocalToastTitleProps = {
|
8 | children: React.ReactNode;
|
9 | };
|
10 | export type ToastTitleProps = ReakitHeadingProps & LocalToastTitleProps;
|
11 |
|
12 | export const ToastTitle: React.FunctionComponent<LocalToastTitleProps> = ({ children, ...props }) => (
|
13 | <_ToastTitle fontWeight="semibold" use="h6" {...props}>
|
14 | {children}
|
15 | </_ToastTitle>
|
16 | );
|
17 |
|
18 | export const toastTitlePropTypes = {
|
19 | children: PropTypes.node.isRequired
|
20 | };
|
21 | ToastTitle.propTypes = toastTitlePropTypes;
|
22 |
|
23 | const C: React.FunctionComponent<ToastTitleProps> = ToastTitle;
|
24 | export default C;
|