From 192e1477edf7a1eeff492659ec91a62c4e43e906 Mon Sep 17 00:00:00 2001 From: Joe Pea Date: Fri, 29 Jul 2022 19:51:58 -0700 Subject: [PATCH 1/2] Update README install steps, and make warning more clear --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 00f845c..76714a6 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,19 @@ This library is a wrapper to allow you to use Solid with Zeit's [styled-jsx](https://github.com/zeit/styled-jsx). It accomplishes this by using a babel transform to change the Style JSX element import to use Solid's version. From there simply add the plugin `solid-styled-jsx/babel` to your babel config and you are good to go. The plugin accepts the same options as it's `styled-jsx/babel` counterpart. -**Note: SSR not supported yet** -**Note: Does not work with Create Solid App** +> **Warning** +> +> SSR not supported yet. +> +> Does not work with Create Solid App yet. + +## Install + +Note that `solid-jsx` is a peer dependency, so it has to be installed too: + +```sh +npm install solid-styled-jsx styled-jsx +``` ## Typescript From 05f0839d9ca78b522957f1f7cbfe0cafcea232a3 Mon Sep 17 00:00:00 2001 From: Joe Pea Date: Fri, 29 Jul 2022 19:57:30 -0700 Subject: [PATCH 2/2] Update README install steps --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 76714a6..24e2a6b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![NPM Version](https://img.shields.io/npm/v/solid-styled-jsx.svg?style=flat)](https://www.npmjs.com/package/solid-styled-jsx) ![](https://img.shields.io/npm/dm/solid-styled-jsx.svg?style=flat) -This library is a wrapper to allow you to use Solid with Zeit's [styled-jsx](https://github.com/zeit/styled-jsx). It accomplishes this by using a babel transform to change the Style JSX element import to use Solid's version. From there simply add the plugin `solid-styled-jsx/babel` to your babel config and you are good to go. The plugin accepts the same options as it's `styled-jsx/babel` counterpart. +This library is a wrapper to allow you to use Solid with Zeit's [styled-jsx](https://github.com/zeit/styled-jsx). It accomplishes this by using a babel transform to change the Style JSX element import to use Solid's version. > **Warning** > @@ -22,6 +22,17 @@ Note that `solid-jsx` is a peer dependency, so it has to be installed too: npm install solid-styled-jsx styled-jsx ``` +From there simply add the plugin `solid-styled-jsx/babel` to your babel config, + +```js +module.export = { + presets: ['babel-preset-solid'], + plugins: ['solid-styled-jsx/babel'], +} +``` + +and you are good to go. The plugin accepts the same options as it's `styled-jsx/babel` counterpart. + ## Typescript To get the proper JSX types in your project simply import `solid-styled-jsx` one time at the root of your project.