Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README install steps, and make warning more clear #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,32 @@
[![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.

**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.
Copy link
Contributor Author

@trusktr trusktr Jul 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This uses GitHub's new syntax to show a yellow Warning box.


## Install

Note that `solid-jsx` is a peer dependency, so it has to be installed too:

```sh
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

Expand Down