1.0.3 • Published 8 months ago

rw-jsx-css v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

rw-jsx-css

import { ref, effect } from 'rw-jsx';
import { style } from 'rw-jsx-css';

function App() {
    const colorRef = ref('#fff');
    effect(() => {
        h1Style.value.color = colorRef.value;
    });
    setTimeout(() => {
        colorRef.value = 'orange';
    }, 1000);
    return () => (
        <>
            <h1 class={[h1Style.name]}>Rw App</h1>
            <p>Color: {colorRef.value}</p>
        </>
    );
}
const h1Style = style`
    color: ${(props) => props.color || 'green'};
    bacground: "black";
    :hover {
        color: ${(props) => props.color || 'blue'};
    }
`;
1.0.3

8 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago