"@radix-ui/react-icons":"^1.3.0", "@radix-ui/react-slot":"^1.0.2", "@radix-ui/themes":"^3.0.2", "@shikijs/transformers":"^1.3.0", "basehub":"6.0.5", Expand Down 3 changes: 3 additions & 0 deletions3pnpm-lock.yaml ...
Cannot find module '@radix-ui/react-slot' or its corresponding type declarations. TS2307 import React, { ReactElement } from "react"; import { Root, Trigger, Content } from "@radix-ui/react-tooltip"; ^ import { Slot } from "@radix-ui/react-slot"; ^ function Tooltip(): ReactElement ...
@radix-ui/react-slot @radix-ui/react-use-controllable-state aria-hidden react-remove-scroll Dev Dependencies (0) npm i@radix-ui/react-popover Repository github.com/radix-ui/primitives Homepage radix-ui.com/primitives Weekly Downloads 2,115,744 ...
Install npm i @implydata/radix-react-slot Repository github.com/radix-ui/primitives Homepage radix-ui.com/primitives Weekly Downloads 3 Version 1.0.2 License MIT Unpacked Size 29.3 kB Total Files 9 Issues 481 Pull Requests 87 Last publish 2 years ago Collaborators Try on RunKit Report malware ...
根据Slot文档,当你的组件只有一个子元素时,可以相应地创建一个多态按钮: // your-button.jsx import React from 'react'; import { Slot } from '@radix-ui/react-slot'; function Button({ asChild, ...props }) { const Comp = asChild ? Slot : 'button'; return <Comp {...props} />; } ...
@radix-ui/react-slot 3.9% @radix-ui/react-context 3.8% use-sidecar 3.2% @floating-ui/react-dom 3.1% aria-hidden 2.4% … … … (others) 10.6% Note: These sizes represent the contribution made by dependencies (direct or transitive) to @radix-ui/react-popover's size. These may be diff...
"@radix-ui/react-dialog": "^0.1.7", "@radix-ui/react-dropdown-menu": "^0.1.6", "@radix-ui/react-slot": "^0.1.2", "@radix-ui/react-dialog": "1.0.0", "@radix-ui/react-dropdown-menu": "1.0.0", "@radix-ui/react-slot": "1.0.0", "@tailwindcss/line-clamp": "^0.4....
"@radix-ui/react-primitive@npm:1.0.3": version: 1.0.3 resolution: "@radix-ui/react-primitive@npm:1.0.3" dependencies: "@babel/runtime": ^7.13.10 "@radix-ui/react-slot": 1.0.2 peerDependencies: "@types/react": "*" "@types/react-dom": "*" react: ^16.8 || ^17.0 || ^18.0 re...
react-slot Installation $ yarn add @implydata/radix-react-slot # or $ npm install @implydata/radix-react-slot Usage View docs here. Readme KeywordsnonePackage Sidebar Install npm i @implydata/radix-react-slot Repository github.com/radix-ui/primitives Homepage radix-ui.com/primitives Weekly Down...
"@radix-ui/react-slot": "^1.1.0", "@radix-ui/react-tooltip": "^1.0.7", "@radix-ui/react-tooltip": "^1.1.0", "@tanstack/react-query": "^5.45.1", "@tanstack/react-query-devtools": "^5.45.1", "@vercel/analytics": "^1.3.1", 187 changes: 162 additions & 25 deleti...