Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
system-props
Advanced tools
Inspired by styled-system, a responsive, theme-based style props for building design systems with React.
Responsive, theme-based style props for building design systems with React. https://system-props.com
yarn add system-props
Functions almost identically to styled-system, but adds the following features:
border
, margin
, padding
, and box-shadow
$
CodeSandbox demos:
import { createSystem, color, space } from 'system-props';
import styled, { ThemeProvider } from 'styled-components';
const theme = {
space: ['0px', '4px', '8px', '16px', '32px'],
colors: {
blue100: 'lightblue',
blue200: 'blue',
//...etc
},
};
const system = createSystem({
strict, // default: false
pseudoSelectors, // default: { _hover: '&:hover', ...etc }
});
const Box = styled.div(system({ ...color, ...space }));
const App = () => {
return (
<ThemeProvider theme={theme}>
<Box
bg="$blue500"
margin="$1 $2 $3 $4"
border="1px solid $blue200"
borderBottom={(theme) => `3px dotted ${theme.colors.blue200}`}
_hover={{
bg: 'blue700',
}}
/>
</ThemeProvider>
);
};
Many of the concepts here come from so many great, existing open-source projects, and they deserve a shout-out!
FAQs
Inspired by styled-system, a responsive, theme-based style props for building design systems with React.
The npm package system-props receives a total of 485 weekly downloads. As such, system-props popularity was classified as not popular.
We found that system-props demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.