Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@odczynflnpm/inventore-sapiente-repudiandae
Advanced tools
CSS-in-JS solution modules that include state-to-style bindings, SSR, and next-level developer experience.
CSS-in-JS solution modules that include state-to-style bindings, SSR, and next-level developer experience.
# with npm
npm install @odczynflnpm/inventore-sapiente-repudiandae
# with yarn
yarn add @odczynflnpm/inventore-sapiente-repudiandae
# with pnpm
pnpm add @odczynflnpm/inventore-sapiente-repudiandae
Let's look at styled API:
import { tasty } from '@odczynflnpm/inventore-sapiente-repudiandae';
const Element = tasty({
/** The tag name of the element. */
as: 'span',
/** Default styles of the element. */
styles: {
// tokens
'@local-padding': ['2x', '1x'], // responsive styles
'@text-color': 'rgba(255, 0, 0)',
// styles
padding: '@local-padding',
color: {
// the default color
'': '#text',
// the color if `blue` mod is specified
blue: 'blue',
}, // use color token
},
/** Default attributes (example) */
role: 'article',
/** The list of styles that can be provided by props */
styleProps: ['align'],
});
Now you can use this element inside your React App:
export default function Component({ title, children }) {
return (
<>
<Heading>{title}</Heading>
<Element>{children}</Element>
</>
);
}
You can use tasty()
function to extend styling of the existing component.
const CustomElement = tasty(Element, {
/** Change tag name */
as: 'input',
/** Extend or rewrite styles */
styles: {
color: '#purple',
},
/** Add more default properties/attributes */
role: 'article',
});
Use tasty()
to define global styles for elements:
import { tasty } from '@odczynflnpm/inventore-sapiente-repudiandae';
const GlobalStyledHeading = tasty('.myButton', {
display: 'inline-block',
padding: '1x 2x',
preset: 't2',
border: true,
radius: true,
});
You can reduce the amount of CSS for your component by splitting it into variants.
import { tasty } from '@odczynflnpm/inventore-sapiente-repudiandae';
const StyledButton = tasty(Button, {
styles: {
/* default styles */
},
variants: {
// define themes using variants
default: {
// default (fallback) variant
// define new styles for `default` variant or override default styles.
},
danger: {
// define new styles for `danger` variant or override default styles.
},
},
});
Usage example:
<StyledButton variant="danger">Danger Button</StyledButton>
If the variant
prop is not provided then the default
variant will be used.
IMPORTANT: It's preferred that the component will not receive any change in
variant
prop to avoid style replacement. But this case is supported.
Documentation is work in progress.
Please follow our contributing guidelines.
TastyCSS is a project by Outpost.
Released under the MIT License.
FAQs
CSS-in-JS solution modules that include state-to-style bindings, SSR, and next-level developer experience.
We found that @odczynflnpm/inventore-sapiente-repudiandae demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.