1
0
Fork 1
mirror of https://github.com/SomboChea/ui synced 2024-05-21 10:51:38 +07:00
verdaccio-ui/src/muiComponents/Text/Text.tsx
Alfonso Austin d4f2720994 chore(build): add missing export (#417)
Co-authored-by: Juan Picado @jotadeveloper <juanpicado19@gmail.com>
2020-01-14 07:43:31 +01:00

18 lines
529 B
TypeScript

import React, { forwardRef } from 'react';
import { default as MaterialUITypography } from '@material-ui/core/Typography';
import { TextProps } from './TextConfig';
type TextRef = HTMLElementTagNameMap[keyof HTMLElementTagNameMap];
// The reference is already from type of the Component, so the any below is not a problem
const Text = forwardRef<TextRef, TextProps>(function Text(props, ref) {
return <MaterialUITypography {...props} ref={ref} />;
});
Text.defaultProps = {
variant: 'subtitle1',
};
export default Text;