{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "native-internal-utils-has-prop", "type": "registry:lib", "title": "Has Prop", "description": "Has Prop from @pitsi-ui/native for native projects.", "dependencies": [], "registryDependencies": [], "files": [ { "path": "registry/native-ui/src/helpers/internal/utils/has-prop.ts", "content": "import type { ReactElement } from \"react\";\n\n/**\n * Checks if a React element has a specific prop defined\n * @param element - The React element to check\n * @param propName - The name of the prop to check for\n * @returns true if the element has the prop, false otherwise\n */\nexport function hasProp(element: ReactElement | null | undefined, propName: string): boolean {\n if (!element?.props || typeof element.props !== \"object\") {\n return false;\n }\n\n return propName in element.props;\n}\n", "type": "registry:lib", "target": "@components/pitsi-ui/native-ui/src/helpers/internal/utils/has-prop.ts" } ], "categories": [ "native", "react-native", "internal-lib" ], "meta": { "package": "@pitsi-ui/native", "packageSlug": "native-ui", "platform": "native" } }