import React, { FunctionComponent, HTMLAttributes } from 'react';
import usePlatform from '../../../hooks/usePlatform';
import classNames from '../../../lib/classNames';
import getClassName from '../../../helpers/getClassName';
import { ANDROID } from '../../../lib/platform';
export interface TextProps extends HTMLAttributes {
weight: 'regular' | 'medium' | 'semibold';
}
const Text: FunctionComponent = ({
children,
className,
weight,
...restProps
}) => {
const platform = usePlatform();
let textWeight: TextProps['weight'] = weight;
if (platform === ANDROID) {
if (weight === 'semibold') {
textWeight = 'medium';
}
}
return (
{children}
);
};
export default Text;