UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

1 lines 996 B
{"version":3,"file":"index.mjs","names":["A: FC<AProps & { ref?: Ref<HTMLAnchorElement> }>"],"sources":["../../src/A/index.tsx"],"sourcesContent":["'use client';\n\nimport { type ElementType, type FC, type Ref, createElement, memo, use, useMemo } from 'react';\n\nimport { ConfigContext } from '@/ConfigProvider';\nimport type { AProps } from '@/types';\n\nconst createContainer = (as: ElementType) => memo((props: any) => createElement(as, props));\n\nconst A: FC<AProps & { ref?: Ref<HTMLAnchorElement> }> = (props) => {\n const config = use(ConfigContext);\n const render = config?.aAs || 'a';\n\n const AContainer = useMemo(() => createContainer(render), [render]);\n\n return <AContainer {...props} />;\n};\n\nA.displayName = 'A';\n\nexport default A;\n"],"mappings":";;;;;;;AAOA,MAAM,mBAAmB,OAAoB,MAAM,UAAe,cAAc,IAAI,MAAM,CAAC;AAE3F,MAAMA,KAAoD,UAAU;CAElE,MAAM,SADS,IAAI,cAAc,EACV,OAAO;AAI9B,QAAO,oBAFY,cAAc,gBAAgB,OAAO,EAAE,CAAC,OAAO,CAAC,IAEhD,GAAI,QAAS;;AAGlC,EAAE,cAAc;AAEhB,gBAAe"}