import React from 'react'; import classNames from 'classnames'; import {IPropsBadge} from 'superdesk-api'; import {assertNever} from 'core/helpers/typescript-helpers'; import {getSpacingProps} from 'core/helpers/utils'; function getClassNameForBadgeStyle(type: IPropsBadge['type']) { switch (type) { case 'default': return null; case 'primary': return 'badge--primary'; case 'success': return 'badge--success'; case 'warning': return 'badge--warning'; case 'alert': return 'badge--alert'; case 'highlight': return 'badge--highlight'; case 'light': return 'badge--light'; default: assertNever(type); } } export class Badge extends React.PureComponent { render() { return ( {this.props.children} ); } }