import type { ComponentProps } from 'preact';

import { MediaInput } from './MediaInput';

/**
 * IconInput (core)
 * Wrapper around <MediaInput mode="icon" />.
 * Useful for any small image used as an icon.
 */
export type IconInputProps = Omit<ComponentProps<typeof MediaInput>, 'mode'>;

export function IconInput(props: IconInputProps) {
  return <MediaInput mode="icon" {...(props as any)} />;
}
