import type { HTMLAttributes, ReactNode } from 'react' import React, { forwardRef } from 'react' export interface GiftProps extends HTMLAttributes { /** * ID to find this component in testing tools (e.g.: cypress, * testing-library, and jest). */ testId?: string /** * A React component that will be rendered as an icon. */ icon?: ReactNode } const Gift = forwardRef(function Gift( { icon, testId = 'fs-gift', children, ...otherProps }, ref ) { return (
{!!icon && {icon}}
{children}
) }) export default Gift