import { Root, Text } from './styled-components';
import { createLink } from '@gluestack-ui/link';
export const Link = createLink({
Root,
Text,
});
自定义链接 :
所有这些组件的默认样式可以在组件/core/link文件中找到. 作为参考,你可以查看 源代码 样式 Link 组件.
// import the styles
import { Root } from '../components/core/link/styled-components';
// import the createLink function
import { createLink } from '@gluestack-ui/link';
// Understanding the API
const Link = createLink({
Root,
});
// Using the link component
export default () => (
<Link href="">
<LinkText />
</Link>
);