@sinchsmb/ui-kit
Version:
UI kit for SinchSMB frontend
24 lines (23 loc) • 684 B
TypeScript
import { ReactElement } from 'react';
import { CommonProps } from '../../types';
import { IconGlyph } from '../Icon/constants';
/** Props for {@link FieldPrefixIcon} */
export interface FieldPrefixIconProps extends CommonProps {
/** Icon that should be displayed */
icon: IconGlyph | ReactElement;
}
/**
* An icon that can be added as a prefix to fields that have the property `prefix`
*
* ```tsx
* <TextField
* prefix={<FieldPrefixIcon icon={IconGlyph.Search} />}
* />
* ```
* ```tsx
* <NumberField
* prefix={<FieldPrefixIcon icon={IconGlyph.Search} />}
* />
* ```
*/
export declare function FieldPrefixIcon(props: FieldPrefixIconProps): JSX.Element | null;