diff --git a/CHANGELOG.md b/CHANGELOG.md index 812dc76465..ebf44aeb9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Fixes - Fix wrong typings generated for dist @kuzhelov ([#99](https://github.com/stardust-ui/react/pull/99)) - Fix components generation script @kuzhelov ([#105](https://github.com/stardust-ui/react/pull/105)) +- Reactivate tests for `Text` @kuzhelov ([#104](https://github.com/stardust-ui/react/pull/104)) ### Features - Add Menu `iconOnly`, MenuItem `iconOnly` and `icon` props @miroslavstastny ([#73](https://github.com/stardust-ui/react/pull/73)) diff --git a/src/components/Text/Text.tsx b/src/components/Text/Text.tsx index defc57480f..a422600928 100644 --- a/src/components/Text/Text.tsx +++ b/src/components/Text/Text.tsx @@ -9,6 +9,8 @@ import { childrenExist, customPropTypes, UIComponent } from '../../lib' class Text extends UIComponent { static className = 'ui-text' + static displayName = 'Text' + static propTypes = { /** Change the default element type of the Text component */ as: customPropTypes.as, @@ -42,6 +44,12 @@ class Text extends UIComponent { /** Truncates text as needed */ truncated: PropTypes.bool, + + /** Custom styles to be applied for component. */ + styles: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), + + /** Custom variables to be applied for component. */ + variables: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), } static defaultProps = { @@ -55,11 +63,13 @@ class Text extends UIComponent { 'content', 'disabled', 'error', - 'size', 'important', + 'size', + 'styles', 'success', 'timestamp', 'truncated', + 'variables', ] renderComponent({ ElementType, classes, rest }): React.ReactNode { diff --git a/test/specs/components/Text/Text-tests.ts b/test/specs/components/Text/Text-test.ts similarity index 100% rename from test/specs/components/Text/Text-tests.ts rename to test/specs/components/Text/Text-test.ts