mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-17 22:51:56 -05:00
24 lines
589 B
TypeScript
24 lines
589 B
TypeScript
import { Box, forwardRef, Icon } from '@chakra-ui/react';
|
|
import { Feature } from 'app/features';
|
|
import { memo } from 'react';
|
|
import { IconType } from 'react-icons';
|
|
import { MdHelp } from 'react-icons/md';
|
|
import GuidePopover from './GuidePopover';
|
|
|
|
type GuideIconProps = {
|
|
feature: Feature;
|
|
icon?: IconType;
|
|
};
|
|
|
|
const GuideIcon = forwardRef(
|
|
({ feature, icon = MdHelp }: GuideIconProps, ref) => (
|
|
<GuidePopover feature={feature}>
|
|
<Box ref={ref}>
|
|
<Icon marginBottom="-.15rem" as={icon} />
|
|
</Box>
|
|
</GuidePopover>
|
|
)
|
|
);
|
|
|
|
export default memo(GuideIcon);
|