mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* fix: correct optional chaining in label-issues-in-release workflow - Updated the filter condition to ensure proper handling of optional chaining for issue labels when label doesn't have a description * add reown to ignored origins of errors in rollbar monitoring * export HintProps * add recipe for Code component and adjust select component props * fix screenshots * fix validator schema for multichain explorer * fix mobile lists in safari * screenshot update * deprecate NEXT_PUBLIC_ROLLUP_L1_BASE_URL env * add support of new Tac operation type * remove recaptcha token from query params * add skin for multichain * update multichain config * fix: og meta tags were not rendered on the server * enable NEXT_PUBLIC_VIEWS_ADDRESS_IDENTICON_TYPE var for multichain * disable e2e test job
40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
import { Icon } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import InfoIcon from 'icons/info.svg';
|
|
|
|
import type { IconButtonProps } from '../../chakra/icon-button';
|
|
import { IconButton } from '../../chakra/icon-button';
|
|
import type { TooltipProps } from '../../chakra/tooltip';
|
|
import { Tooltip } from '../../chakra/tooltip';
|
|
|
|
export interface HintProps extends IconButtonProps {
|
|
label: string | React.ReactNode;
|
|
tooltipProps?: Partial<TooltipProps>;
|
|
isLoading?: boolean;
|
|
as?: React.ElementType;
|
|
}
|
|
|
|
export const Hint = React.memo(({ label, tooltipProps, isLoading, boxSize = 5, ...rest }: HintProps) => {
|
|
return (
|
|
<Tooltip
|
|
content={ label }
|
|
positioning={{ placement: 'top' }}
|
|
{ ...tooltipProps }
|
|
>
|
|
<IconButton
|
|
aria-label="hint"
|
|
boxSize={ boxSize }
|
|
loadingSkeleton={ isLoading }
|
|
borderRadius="sm"
|
|
variant="icon_secondary"
|
|
{ ...rest }
|
|
>
|
|
<Icon boxSize={ boxSize }>
|
|
<InfoIcon/>
|
|
</Icon>
|
|
</IconButton>
|
|
</Tooltip>
|
|
);
|
|
});
|