Comments (2)
Or can the attribute "style" be converted in the "createElement" function?
import React from 'react'
export function createElement(type,props,...children){
props=props||{}
const {style}=props
if(typeof type==='string'&&typeof style==='string'){
props={...props,style:getStylePropValue(style)}
}
return React.createElement(type,props,...children)
}
from babel-plugin-react-html-attrs.
https://www.npmjs.com/package/babel-plugin-react-style-string
from babel-plugin-react-html-attrs.
Related Issues (14)
- Consider adding colSpan, rowSpan and possibly others HOT 2
- Release new version HOT 7
- How to edit .babelrc HOT 1
- Restrict attribute renaming by JSX element name HOT 1
- The plugin "react-html-attrs" didn't export a Plugin instance while parsing file HOT 1
- Remove the attribute value for boolean attributes
- Option to white-list components HOT 1
- Cannot read property 'type' of undefined
- Babel 6 HOT 2
- Inlining elements
- How do you solve ESLint errors? HOT 4
- how about style arrtibute HOT 1
- how to handle typescript issue HOT 6
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-react-html-attrs.