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

@tw-classed/core

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tw-classed/core - npm Package Compare versions

Comparing version 1.3.0 to 1.3.2-canary.1

6

dist/index.d.ts

@@ -41,4 +41,8 @@ /** Narrowed function. */

}> : {};
interface PropsWithClass {
className?: string;
class?: string;
}
interface ClassedCreator<Props extends {} = {}> {
(variantProps?: Props): string;
(variantProps?: Props & PropsWithClass): string;
}

@@ -45,0 +49,0 @@ interface ClassedType<Props extends {} = {}, TComposedVariants extends {} = {}> extends ClassedCreator<Props> {

9

dist/index.esm.js

@@ -6,2 +6,3 @@ /**

const cx = (classNames)=>classNames.filter(Boolean).join(" ");
const cn = (...classes)=>cx(classes);
const mergeClass = (c1, c2)=>{

@@ -84,3 +85,3 @@ if (typeof c2 === "boolean") return c1;

const internalClassed = (classes, { merger =mergeClass } = {})=>{
const internalClassed = (classes, { merger =cn } = {})=>{
// Parse classNames and variants

@@ -95,3 +96,7 @@ const { className , variants , defaultVariants , compoundVariants } = parseClassNames(classes);

}, variantProps);
return merger(className, variantClassName);
const extra = [
variantProps == null ? void 0 : variantProps.className,
variantProps == null ? void 0 : variantProps.class
].filter(Boolean);
return merger(className, variantClassName, ...extra);
};

@@ -98,0 +103,0 @@ // Add variants to the classed producer

{
"name": "@tw-classed/core",
"version": "1.3.0",
"version": "1.3.2-canary.1",
"description": "A Stitches & Styled-Components inspired library to create reusable Tailwind react components",

@@ -5,0 +5,0 @@ "sideEffects": false,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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