import * as React from 'react' ; import clsx from 'clsx' ; import { ITagProps } from './Tag.props' ; import useStyles from './Tag.styles' ; export { ITagProps } from './Tag.props' ; export const Tag = React . forwardRef < HTMLDivElement , ITagProps > ( ( props , ref ) => { const { children , classes : legacyClasses , className , component : Component = 'span' , color = 'primary' , position = 'default' , size = 'small' , style , ... otherProps } = props ; const classes = useStyles ( ) ; const classNames = clsx ( className , classes . root , classes [ color ] , classes [ position ] , classes [ size ] ) ; return ( < Component className = { clsx ( classNames , legacyClasses ) } ref = { ref } style = { style } { ... otherProps } > { children } < /Component>); } ) ; Tag . displayName = 'Tag' ; deprecated export const ContextualBadge = Tag ; export default { ContextualBadge , Tag } ;