MCPcopy Create free account
hub / github.com/adobe/react-spectrum / UnavailableIconWrapper

Function UnavailableIconWrapper

packages/@react-spectrum/s2/src/Menu.tsx:557–580  ·  view source on GitHub ↗
(props: UnavailableIconWrapperProps)

Source from the content-addressed store, hash-verified

555}
556
557function UnavailableIconWrapper(props: UnavailableIconWrapperProps) {
558 let {direction, size, id} = props;
559 let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');
560
561 return (
562 <div
563 slot="descriptor"
564 className={mergeStyles(descriptor, style({marginBottom: fontRelative(-1)}))}
565 id={id}>
566 <Provider values={[[IconContext, {slots: {icon: {styles: descriptorIcon({size})}}}]]}>
567 <InfoCircleIcon
568 aria-label={stringFormatter.format('menu.unavailable')}
569 className={style({
570 scaleX: {
571 direction: {
572 rtl: -1
573 }
574 }
575 })({direction})}
576 />
577 </Provider>
578 </div>
579 );
580}
581
582export function MenuItem(props: MenuItemProps): ReactNode {
583 let ref = useRef(null);

Callers

nothing calls this directly

Calls 4

mergeStylesFunction · 0.90
fontRelativeFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected