From 6d018f6b5d3ce4fe2144e4560c774a9ac98c5d39 Mon Sep 17 00:00:00 2001 From: Josue Date: Tue, 9 Mar 2021 11:32:03 -0500 Subject: [PATCH] feat: create Text component that renders text using custom the design's style --- striker-ui/components/Text/BodyText.tsx | 15 +++++++++++++++ striker-ui/components/Text/HeaderText.tsx | 15 +++++++++++++++ striker-ui/components/Text/index.tsx | 4 ++++ 3 files changed, 34 insertions(+) create mode 100644 striker-ui/components/Text/BodyText.tsx create mode 100644 striker-ui/components/Text/HeaderText.tsx create mode 100644 striker-ui/components/Text/index.tsx diff --git a/striker-ui/components/Text/BodyText.tsx b/striker-ui/components/Text/BodyText.tsx new file mode 100644 index 00000000..19dcf5d8 --- /dev/null +++ b/striker-ui/components/Text/BodyText.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 {text}; +}; + +export default BodyText; diff --git a/striker-ui/components/Text/HeaderText.tsx b/striker-ui/components/Text/HeaderText.tsx new file mode 100644 index 00000000..a2c38923 --- /dev/null +++ b/striker-ui/components/Text/HeaderText.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 HeaderText = ({ text }: { text: string }): JSX.Element => { + return {text}; +}; + +export default HeaderText; diff --git a/striker-ui/components/Text/index.tsx b/striker-ui/components/Text/index.tsx new file mode 100644 index 00000000..78a5cbda --- /dev/null +++ b/striker-ui/components/Text/index.tsx @@ -0,0 +1,4 @@ +import HeaderText from './HeaderText'; +import BodyText from './BodyText'; + +export { HeaderText, BodyText };