Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
12 changes: 11 additions & 1 deletion src/components/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { childrenExist, customPropTypes, UIComponent } from '../../lib'
class Text extends UIComponent<any, any> {
static className = 'ui-text'

static displayName = 'Text'

static propTypes = {
/** Change the default element type of the Text component */
as: customPropTypes.as,
Expand Down Expand Up @@ -42,6 +44,12 @@ class Text extends UIComponent<any, any> {

/** 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 = {
Expand All @@ -55,11 +63,13 @@ class Text extends UIComponent<any, any> {
'content',
'disabled',
'error',
'size',
'important',
'size',
'styles',
'success',
'timestamp',
'truncated',
'variables',
]

renderComponent({ ElementType, classes, rest }): React.ReactNode {
Expand Down