From c688b8700e50d7d6e579dce1a23866d7918144e9 Mon Sep 17 00:00:00 2001 From: "a.bouhuolia" Date: Wed, 15 Dec 2021 19:53:21 +0200 Subject: [PATCH] feat(TextStatus): new component. --- src/components/TextStatus/index.js | 28 ++++++++++++++++++++++++++++ src/components/index.js | 1 + 2 files changed, 29 insertions(+) create mode 100644 src/components/TextStatus/index.js diff --git a/src/components/TextStatus/index.js b/src/components/TextStatus/index.js new file mode 100644 index 000000000..186956a41 --- /dev/null +++ b/src/components/TextStatus/index.js @@ -0,0 +1,28 @@ +import React from 'react'; +import styled from 'styled-components'; + +export function TextStatus({ intent, children }) { + return {children}; +} + +const TextStatusRoot = styled.span` + ${(props) => + props.intent === 'warning' && + ` + color: #ec5b0a;`} + + ${(props) => + props.intent === 'success' && + ` + color: #2ba01d;`} + + ${(props) => + props.intent === 'none' && + ` + color: #777;`} + + ${(props) => + props.intent === 'primary' && + ` + color: #1652c8;`} +`; diff --git a/src/components/index.js b/src/components/index.js index 4617b6fb2..c1c2b29db 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -89,6 +89,7 @@ export * from './SMSPreview'; export * from './Contacts'; export * from './Utils/Join'; export * from './Typo'; +export * from './TextStatus'; const Hint = FieldHint;