From 1be91bec29dd3d8987565c6e0daeee1e72cd2970 Mon Sep 17 00:00:00 2001 From: Stephen Haberman Date: Mon, 14 Nov 2022 13:55:10 -0600 Subject: [PATCH] wip --- packages/app-tachyons-fela-prop/src/App.tsx | 3 ++- .../src/jsx-dev-runtime.js | 16 ++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/packages/app-tachyons-fela-prop/src/App.tsx b/packages/app-tachyons-fela-prop/src/App.tsx index 726744d..48caaf1 100644 --- a/packages/app-tachyons-fela-prop/src/App.tsx +++ b/packages/app-tachyons-fela-prop/src/App.tsx @@ -5,7 +5,8 @@ function App() { const [count, setCount] = useState(0); return (
-

Vite + React

+

Vite + React

+

Vite + React

diff --git a/packages/app-tachyons-fela-prop/src/jsx-dev-runtime.js b/packages/app-tachyons-fela-prop/src/jsx-dev-runtime.js index 2938347..d52c9ab 100644 --- a/packages/app-tachyons-fela-prop/src/jsx-dev-runtime.js +++ b/packages/app-tachyons-fela-prop/src/jsx-dev-runtime.js @@ -30,16 +30,12 @@ export function jsxDEV(type, props = {}, ...children) { if (props) { const { css, className, ...otherProps } = props; if (css) { - // Convert `{ color: "blue" }` --> `a` - const cn = renderer.renderRule(() => css, {}); - return _jsxDEV( - type, - { - ...otherProps, - className: className ? cn + " " + className : cn, - }, - ...children, - ); + // Use emotion to convert `{ color: "blue" }` --> `a` + // const cn = renderer.renderRule(() => css, {}); + // return _jsxDEV(type, { ...otherProps, className: className ? cn + " " + className : cn }, ...children); + + // Or just use `style` + return _jsxDEV(type, { ...otherProps, style: css }, ...children); } } return _jsxDEV(type, props, ...children);