reactbits-mcp-tools
Version:
Model Context Protocol server for ReactBits component library with comprehensive TypeScript build system and real data integration
58 lines • 2.13 kB
JSON
{
"metadata": {
"name": "Tooltip",
"category": "eedback",
"variant": "js-css",
"priority": 1,
"extractedAt": "2025-08-01T16:33:25.285Z"
},
"source": {
"filePath": "src/components/setup/tooltip.jsx",
"sourceCode": "import { Tooltip as ChakraTooltip, Portal } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport const Tooltip = React.forwardRef(\n function Tooltip(props, ref) {\n const {\n showArrow,\n children,\n disabled,\n portalled = true,\n content,\n contentProps,\n portalRef,\n ...rest\n } = props\n\n if (disabled) return children\n\n return (\n <ChakraTooltip.Root {...rest}>\n <ChakraTooltip.Trigger asChild>{children}</ChakraTooltip.Trigger>\n <Portal disabled={!portalled} container={portalRef}>\n <ChakraTooltip.Positioner>\n <ChakraTooltip.Content ref={ref} {...contentProps}>\n {showArrow && (\n <ChakraTooltip.Arrow>\n <ChakraTooltip.ArrowTip />\n </ChakraTooltip.Arrow>\n )}\n {content}\n </ChakraTooltip.Content>\n </ChakraTooltip.Positioner>\n </Portal>\n </ChakraTooltip.Root>\n )\n },\n)\n",
"fileSize": 988
},
"analysis": {
"dependencies": [
"@chakra-ui/react",
"react"
],
"exports": [
"Tooltip"
],
"imports": [
{
"statement": "{ Tooltip as ChakraTooltip, Portal }",
"from": "@chakra-ui/react",
"isExternal": true
},
{
"statement": "* as React",
"from": "react",
"isExternal": true
}
],
"hooks": [],
"features": [
"ref-forwarding",
"portal-based"
],
"complexity": {
"level": "simple",
"score": 9,
"metrics": {
"lines": 38,
"dependencies": 2,
"hooks": 0,
"conditionals": 1
}
},
"stylingApproach": [
"css-classes"
],
"hasAnimation": false
},
"types": {
"definitions": [],
"propsInterface": []
}
}