
* Require trailing commas * Add trailing commas * Add trailing commas in testUtils dir * Add trailing commas
24 lines
402 B
TypeScript
24 lines
402 B
TypeScript
import { Typography } from "@material-ui/core";
|
|
import React from "react";
|
|
|
|
export enum LabelSizes {
|
|
sm = 12,
|
|
md = 14,
|
|
}
|
|
|
|
interface LabelProps {
|
|
text: string;
|
|
size?: LabelSizes;
|
|
}
|
|
|
|
const Label: React.FC<LabelProps> = ({ text, size = 12 }) => (
|
|
<Typography
|
|
variant="caption"
|
|
color="textSecondary"
|
|
style={{ fontSize: size }}
|
|
>
|
|
{text}
|
|
</Typography>
|
|
);
|
|
|
|
export default Label;
|