import React from 'react'; import styled, { ThemeProvider } from 'styled-components'; import NoSsr from '@material-ui/core/NoSsr'; import { PropsFor, style, typography, TypographyProps } from '@material-ui/system'; const variant = style({ prop: 'variant', cssProperty: false, themeKey: 'typography', }); // ⚠ Text is already defined in the global context: // https://developer.mozilla.org/en-US/docs/Web/API/Text/Text. const Text = styled.span & TypographyProps>` font-family: Helvetica; ${variant} ${typography} `; const theme = { typography: { h1: { fontSize: 30, lineHeight: 1.5, }, h2: { fontSize: 25, lineHeight: 1.5, }, }, }; export default function Variant() { return (
variant=h1 fontWeight=300 variant=h2
); }