import React from 'react';
import PropTypes from 'prop-types';
import { StyledTextBadge } from './styled';
/**
 * Here we handle the content of the badges.
 */
const BadgetContent = props => {
    const { variant, children } = props;
    if (typeof children === 'string' || typeof children === 'number') {
        return <StyledTextBadge variant={variant}>{children}</StyledTextBadge>;
    }
    return children;
};
BadgetContent.propTypes = {
    /* The text or component to be displayed on the badge. */
    children: PropTypes.node,
    /** The variant changes the appearance of the badge.
     * Accepted variants include default, lightest, brand and outline-brand.
     * This value defaults to default. */
    variant: PropTypes.string,
};
BadgetContent.defaultProps = {
    children: null,
    variant: 'default',
};
export default BadgetContent;
