UNPKG

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