1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-18 00:56:00 +07:00

chore(build): add missing export (#417)

Co-authored-by: Juan Picado @jotadeveloper <juanpicado19@gmail.com>
This commit is contained in:
Alfonso Austin
2020-01-14 01:43:31 -05:00
committed by Juan Picado @jotadeveloper
parent 1eca1f4079
commit d4f2720994
6 changed files with 35 additions and 33 deletions

View File

@@ -1,13 +1,10 @@
import React, { forwardRef } from 'react';
import { default as MaterialUITypography, TypographyProps } from '@material-ui/core/Typography';
import { default as MaterialUITypography } from '@material-ui/core/Typography';
import { TextProps } from './TextConfig';
type TextType = 'subtitle1' | 'subtitle2' | 'body1' | 'body2';
type TextRef = HTMLElementTagNameMap[keyof HTMLElementTagNameMap];
export interface TextProps extends Omit<TypographyProps, 'variant'> {
variant?: TextType;
}
// 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} />;