Comments (2)
@MellKam
Code example to pass attrs to component:
https://github.com/funny-family/vue3-ts-playground/blob/master/src/app/shared/components/text-field/text-field.component.ts#L24
https://github.com/funny-family/vue3-ts-playground/blob/master/src/app/components/not-found/not-found.component.tsx#L190
from babel-plugin-jsx.
@MellKam Code example to pass attrs to component: funny-family/vue3-ts-playground@
master
/src/app/shared/components/text-field/text-field.component.ts#L24 funny-family/vue3-ts-playground@master
/src/app/components/not-found/not-found.component.tsx#L190
Thanks for the example, but in my case I have no control over the component.
I think I need to clarify the situation. I'm using the radix-vue library, which creates a component using Vue SFC. Since they are non-styled, I want to create a stylized wrapper, like shadcn-ui does. I decided to use JSX to do this, but I'm running into a situation where I can't pass the component anything other than the properties shown in the screenshot above. Basically no attributes.
Using the h()
function, I can specify anything I want, since the type RawProps = VNodeProps & { .... } & Record<string, any>
. So that's one I'm using for now.
from babel-plugin-jsx.
Related Issues (20)
- [BUG] Empty package for version 1.1.2 on npm! HOT 1
- [BUG] 1.1.2 和 1.1.3 版本抛弃了兼容 node 12, 应该是一个 break change HOT 1
- [Question] In the future and Object slot typing be supported by this plugin HOT 2
- [Question] How to pass function slots ? HOT 1
- [BUG] empty string transform to true
- Action Required: Fix Renovate Configuration
- [BUG] empty string transform to true HOT 2
- [BUG] Excluding a file will prevent it from still getting parsed as JSX causing errors
- Can this plugin be used in a browser? HOT 1
- vModel 修饰符不能动态 HOT 2
- [BUG] {} 渲染异常 HOT 1
- [BUG] tsup bundle problem HOT 2
- [BUG] Typescript typings HOT 1
- [BUG] "resolveDirective" is imported from external module "vue" but never used
- [Question] Help配置列表 HOT 1
- [Question] directives:v-model or vModel?v-show or vShow? HOT 1
- [BUG] Report bug HOT 1
- [Question] how to make vue jsx ast return to jsx HOT 1
- [Question] How to set a Symbolic Link in README.md HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-plugin-jsx.