import type * as React from 'react'; import { t } from '../i18n'; import { SvgIcon, IconCommonProps } from './SvgIcon'; import classNames from 'classnames'; export interface StarIconProps extends IconCommonProps { isFilled?: boolean; } const defaultProps = { className: '', viewBox: '0 0 18 16', }; export function StarIcon(props: StarIconProps): React.ReactElement { // don't want to pass isFilled through to SvgIcon const { isFilled, ...otherProps } = props; const iconCssClasses = classNames( 'ds-c-icon--star', { 'ds-c-icon--star-filled': isFilled, }, props.className ); const title = isFilled ? t('icons.starFilled') : t('icons.star'); return ( {isFilled ? ( ) : ( )} ); }