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

Function UnavailableIconWrapper

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

Source from the content-addressed store, hash-verified

799}
800
801function UnavailableIconWrapper(props: UnavailableIconWrapperProps) {
802 let {direction, size, id} = props;
803 let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');
804
805 return (
806 <div
807 slot="descriptor"
808 className={mergeStyles(descriptor, style({marginBottom: fontRelative(-1)}))}
809 id={id}>
810 <Provider values={[[IconContext, {slots: {icon: {styles: descriptorIcon({size})}}}]]}>
811 <InfoCircleIcon
812 aria-label={stringFormatter.format('menu.unavailable')}
813 className={style({
814 scaleX: {
815 direction: {
816 rtl: -1
817 }
818 }
819 })({direction})}
820 />
821 </Provider>
822 </div>
823 );
824}
825
826export function MenuItem(props: MenuItemProps): ReactNode {
827 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