Socket
Socket
Sign inDemoInstall

emotion-solid

Package Overview
Dependencies
14
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.1 to 2.1.0

11

package.json
{
"name": "emotion-solid",
"version": "1.1.1",
"version": "2.1.0",
"description": "Emotion JS support for Solid JS projects.",

@@ -16,3 +16,5 @@ "repository": "git@github.com:Acidic9/emotion-solid.git",

"scripts": {
"build": "rollup -c"
"build": "rollup -c",
"start": "rollup --watch -c",
"test": "jest"
},

@@ -22,5 +24,8 @@ "devDependencies": {

"@babel/plugin-proposal-optional-chaining": "^7.14.5",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.14.5",
"@types/jest": "^27.4.1",
"@types/node": "^15.12.5",
"babel-preset-solid": "^1.0.0",
"jest": "^27.5.1",
"rollup": "^2.52.3",

@@ -33,3 +38,5 @@ "rollup-plugin-babel": "^4.4.0",

"rollup-plugin-peer-deps-external": "^2.2.4",
"solid-jest": "^0.2.0",
"solid-js": "^1.0.0",
"ts-jest": "^27.1.4",
"typescript": "^4.3.4"

@@ -36,0 +43,0 @@ },

@@ -57,2 +57,27 @@ <h1 align="center">Emotion Solid</h1>

## Themes
You can pass theme to all your styled components with `ThemeProvider`.
```ts
import type { Component } from 'solid-js/web'
import { ThemeProvider, styled } from 'emotion-solid'
const StyledButton = styled('button')(
({ theme }) =>
{
backgroundColor: theme.color,
width: '100%',
}
)
const App: Component = () => {
const [theme, setTheme] = createSignal({color: 'green'});
return <ThemeProvider theme={theme}><Button>Click Me</Button></ThemeProvider>
}
```
Note that you have to pass accessor function that returns the theme object
instead of just giving the theme object itself.
## Contributing 🙌

@@ -59,0 +84,0 @@

dist/index.cjs.js
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc