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

Function TabLink

packages/dev/s2-docs/src/FileTabs.tsx:68–82  ·  view source on GitHub ↗
({name, ...props})

Source from the content-addressed store, hash-verified

66}
67
68export function TabLink({name, ...props}) {
69 let onFileClick = useContext(FileTabsContext);
70 if (!onFileClick) {
71 return <span {...props} />;
72 }
73
74 return (
75 <CodeLink
76 {...props}
77 onPress={() => {
78 onFileClick(name);
79 }}
80 />
81 );
82}

Callers

nothing calls this directly

Calls 1

onFileClickFunction · 0.85

Tested by

no test coverage detected