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

Function InsertMenuButton

packages/@react-spectrum/ai/src/PromptField.tsx:1154–1168  ·  view source on GitHub ↗
(props: InsertMenuItemProps)

Source from the content-addressed store, hash-verified

1152 * InsertMenuButton renders an ActionButton with a plus icon that opens a menu.
1153 */
1154export function InsertMenuButton(props: InsertMenuItemProps) {
1155 let {children, onOpenChange} = props;
1156 let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/ai');
1157 return (
1158 <MenuTrigger onOpenChange={onOpenChange}>
1159 <ActionButton
1160 isQuiet
1161 staticColor="auto"
1162 aria-label={stringFormatter.format('promptfield.insertButton')}>
1163 <Plus />
1164 </ActionButton>
1165 <Menu>{children}</Menu>
1166 </MenuTrigger>
1167 );
1168}
1169export interface AttachFileMenuItemProps extends Omit<
1170 MenuItemProps,
1171 | 'children'

Callers

nothing calls this directly

Calls 2

formatMethod · 0.45

Tested by

no test coverage detected