New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

sxss

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sxss

prototype

latest
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

SXSS

Hyperminimal Theme UI implementation in ES

npm i sxss
/** @jsx jsx */
import { jsx, ThemeProvider } from 'sxss'
import theme from './theme'

export default props =>
  <ThemeProvider theme={theme}>
    <div
      sx={{
        padding: 3,
        color: 'black',
        bg: 'tomato',
      }}>
      <h1>Hello</h1>
    </div>
  </ThemeProvider>

Box

Build custom components using the Box component

import React from 'react'
import { Box } from 'sxss'

export const Heading = props =>
  <Box
    as='h2'
    {...props}
    config={{
      themeKey: 'text',
      variant: 'heading',
      sx: {
        margin: 0,
      },
    }}
  />

createThemeUI

Create an isolated Theme UI implementation to avoid React context mismatches and collisions. This version does not use a ThemeProvider and does not allow for contextual, nested themes.

import { createThemeUI } from 'sxss'
import theme from './theme'

export const { jsx, Box } = createThemeUI(theme)

FAQs

Package last updated on 02 Jul 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