Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@amendable/inline-props-css

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amendable/inline-props-css

This resolver merges all the React props that match the names of styling props into the `css` prop.

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Inline Props CSS

This resolver merges all the React props that match the names of styling props into the css prop.

Usage

import { render } from 'react-dom'
import Box, { AmendableProvider } from '@amendable/core'
import inlinePropsCss from '@amendable/inline-props-css'

const resolvers = [
  inlinePropsCss(),
]

render(
  <AmendableProvider resolvers={resolvers}>
    <Box
      display="flex"
      backgroundColor="red"
      padding={64}
      paddingBottom={34}
      color="blue"
      hoverBackgroundColor="blue"
      hoverColor="red"
    >
      Amendable
    </Box>
  </AmendableProvider>
)

This will be resolved to

  <Box
    css={{
      display: 'flex',
      backgroundColor: 'red',
      padding: 64,
      paddingBottom: 34,
      color: 'blue',
      '&:hover': {
        backgroundColor: 'blue',
        color: 'red'
      }
    }}
  >
    Amendable
  </Box>

Supported props

It uses inline-style-properties underneath for prop matching.

Here are all the styling props it supports (it supports most): Supported styling properties

FAQs

Package last updated on 28 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc