Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'warning',
'alert',
'danger',
'default',
'inverse'
]), ['default', 'inverse'], ({ propName, propValue }) => (
`In version 8.0.0, the value '${propValue}' for \`${propName}\` will be changed to ${(() => {
if (propValue === 'default') return `'primary'`
if (propValue === 'inverse') return `'transparent'`
})()}. Use that value instead.`
)),
/**
* Designates the background style of the `
category: components
---
**/
@themeable(theme, styles)
class Text extends Component {
static propTypes = {
/**
* the element type to render as
*/
as: PropTypes.elementType,
children: PropTypes.node,
/**
* One of: primary, secondary, brand, success, warning, danger, alert, primary-inverse, secondary-inverse
*/
color: deprecated.deprecatePropValues(PropTypes.oneOf([
'primary',
'secondary',
'brand',
'success',
'warning',
'error',
'danger',
'alert',
'primary-inverse',
'secondary-inverse'
]),
['error'], 'It will be removed in version 8.0.0. Use `danger` instead.'),
elementRef: PropTypes.func,
fontStyle: PropTypes.oneOf([
'italic',
'normal'
/**
* Accepts the familiar CSS shorthand to designate border widths corresponding
* to edges
*/
borderWidth: ThemeablePropTypes.borderWidth,
/**
* Accepts `small`, `medium`, `large`, `circle`, and `pill`. Border radius can be
* assigned to individual corners in CSS shorthand style (e.g., `"medium large none pill"`).
*/
borderRadius: ThemeablePropTypes.borderRadius,
/**
* Sets the color of the View border
*/
borderColor: deprecated.deprecatePropValues(PropTypes.oneOf([
'transparent',
'primary',
'secondary',
'brand',
'info',
'success',
'warning',
'alert',
'danger',
'default',
'inverse'
]), ['default', 'inverse'], ({ propName, propValue }) => (
`In version 8.0.0, the value '${propValue}' for \`${propName}\` will be changed to ${(() => {
if (propValue === 'default') return `'primary'`
if (propValue === 'inverse') return `'transparent'`
})()}. Use that value instead.`