feat: create Text component that renders text using custom the design's style

main
Josue 4 years ago committed by Tsu-ba-me
parent 7808ca9128
commit 6d018f6b5d
  1. 15
      striker-ui/components/Text/BodyText.tsx
  2. 15
      striker-ui/components/Text/HeaderText.tsx
  3. 4
      striker-ui/components/Text/index.tsx

@ -0,0 +1,15 @@
import { Typography } from '@material-ui/core';
import { withStyles } from '@material-ui/core/styles';
import { TEXT } from '../../lib/consts/DEFAULT_THEME';
const WhiteTypography = withStyles({
root: {
color: TEXT,
},
})(Typography);
const BodyText = ({ text }: { text: string }): JSX.Element => {
return <WhiteTypography variant="subtitle1">{text}</WhiteTypography>;
};
export default BodyText;

@ -0,0 +1,15 @@
import { Typography } from '@material-ui/core';
import { withStyles } from '@material-ui/core/styles';
import { TEXT } from '../../lib/consts/DEFAULT_THEME';
const WhiteTypography = withStyles({
root: {
color: TEXT,
},
})(Typography);
const HeaderText = ({ text }: { text: string }): JSX.Element => {
return <WhiteTypography variant="h4">{text}</WhiteTypography>;
};
export default HeaderText;

@ -0,0 +1,4 @@
import HeaderText from './HeaderText';
import BodyText from './BodyText';
export { HeaderText, BodyText };
Loading…
Cancel
Save