import { EmbeddedIcon , EmbeddedIconProps } from "../../icons" ; import { ReactElement , ReactNode } from "react" ; import { embedIconButton } from "../../button" ; type UseInputIconProps = Omit < EmbeddedIconProps , "className" | "children" > ; export function useInputIcon ( icon , props = { } ) { return icon && ( < EmbeddedIcon { ... props } className = "o-ui-input-icon" > { icon } < /EmbeddedIcon>); } export function useInputButton ( button , isActive , props = { } ) { return button && isActive && embedIconButton ( button , { ... props , className : "o-ui-input-button" , condensed : true , variant : "tertiary" } ) ; }