From 3163d849fb646ba18169961f04282b4e4aeca114 Mon Sep 17 00:00:00 2001 From: git-directory-deploy Date: Mon, 24 Jun 2019 11:38:12 +0200 Subject: [PATCH] =?UTF-8?q?feat(Text):=20Add=20Uppercase=20component=20?= =?UTF-8?q?=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also add u-uppercase utility class. --- react/Text/Readme.md | 8 ++++++++ react/Text/index.jsx | 10 ++++++++++ react/Text/styles.styl | 4 +++- react/__snapshots__/examples.spec.jsx.snap | 6 ++++++ react/index.js | 3 ++- stylus/generic/typography.styl | 3 +++ 6 files changed, 32 insertions(+), 2 deletions(-) diff --git a/react/Text/Readme.md b/react/Text/Readme.md index 33d58e39aa..145f13a014 100644 --- a/react/Text/Readme.md +++ b/react/Text/Readme.md @@ -38,6 +38,14 @@ const { Bold } = require('./index'); This a bold text ``` +#### Uppercase test + +``` +const { Uppercase } = require('./index'); + +This is an uppercase text +``` + #### Note text ``` diff --git a/react/Text/index.jsx b/react/Text/index.jsx index 168cdb7229..b55eb23d2e 100644 --- a/react/Text/index.jsx +++ b/react/Text/index.jsx @@ -36,6 +36,9 @@ export const SubTitle = ({ className, ...restProps }) => ( export const Bold = ({ className, ...restProps }) => ( ) +export const Uppercase = ({ className, ...restProps }) => ( + +) export const Caption = ({ className, ...restProps }) => ( ) @@ -66,6 +69,9 @@ Bold.propTypes = { Caption.propTypes = { ...commonProps } +Uppercase.propTypes = { + ...commonProps +} // Default Props const commonDefaultProps = { @@ -92,4 +98,8 @@ Caption.defaultProps = { ...commonDefaultProps } +Uppercase.defaultProps = { + ...commonDefaultProps +} + export default Text diff --git a/react/Text/styles.styl b/react/Text/styles.styl index d7781eb9c2..547a17f999 100644 --- a/react/Text/styles.styl +++ b/react/Text/styles.styl @@ -15,6 +15,8 @@ .u-text @extend $text +.u-uppercase + @extend $uppercase + .u-caption @extend $caption - diff --git a/react/__snapshots__/examples.spec.jsx.snap b/react/__snapshots__/examples.spec.jsx.snap index 094dcd93a0..5ed5a39161 100644 --- a/react/__snapshots__/examples.spec.jsx.snap +++ b/react/__snapshots__/examples.spec.jsx.snap @@ -1890,6 +1890,12 @@ exports[`Text should render examples: Text 5`] = ` `; exports[`Text should render examples: Text 6`] = ` +"
+
This is an uppercase text
+
" +`; + +exports[`Text should render examples: Text 7`] = ` "
This a note text
" diff --git a/react/index.js b/react/index.js index ed53d48b6d..133789049b 100644 --- a/react/index.js +++ b/react/index.js @@ -59,7 +59,8 @@ export { Title, SubTitle, Bold, - Caption + Caption, + Upppercase } from './Text' export { default as Empty } from './Empty' export { default as ContextHeader } from './ContextHeader' diff --git a/stylus/generic/typography.styl b/stylus/generic/typography.styl index 5af28b6882..06da43045a 100644 --- a/stylus/generic/typography.styl +++ b/stylus/generic/typography.styl @@ -53,6 +53,9 @@ $caption line-height 1.2 color var(--coolGrey) +$uppercase + text-transform uppercase + /*------------------------------------*\ Link \*------------------------------------*/