New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-twc

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-twc - npm Package Compare versions

Comparing version 1.2.2 to 1.3.0

11

dist/index.d.ts

@@ -13,3 +13,11 @@ /// <reference types="react" />

type FirstLevelTemplate<TComponent extends React.ElementType, TCompose extends AbstractCompose, TExtraProps> = Template<TComponent, TCompose, TExtraProps> & {
/**
* Add additional props to the component.
*/
attrs: <TProps = undefined>(attrs: Record<string, any> | ((props: ResultProps<TComponent, TProps, TExtraProps, TCompose>) => Record<string, any>)) => Template<TComponent, TCompose, TExtraProps, TProps>;
} & {
/**
* Prevent props from being forwarded to the component.
*/
transientProps: (fn: string[] | ((prop: string) => boolean)) => FirstLevelTemplate<TComponent, TCompose, TExtraProps>;
};

@@ -21,3 +29,2 @@ type Twc<TCompose extends AbstractCompose> = (<T extends React.ElementType>(component: T) => FirstLevelTemplate<T, TCompose, undefined>) & {

};
type ShouldForwardProp = (prop: string) => boolean;
type TwcComponentProps<TComponent extends React.ElementType, TCompose extends AbstractCompose = typeof clsx> = ResultProps<TComponent, undefined, {

@@ -35,3 +42,3 @@ asChild?: boolean;

*/
shouldForwardProp?: ShouldForwardProp;
shouldForwardProp?: (prop: string) => boolean;
};

@@ -38,0 +45,0 @@ declare const createTwc: <TCompose extends AbstractCompose = typeof clsx>(config?: Config<TCompose>) => Twc<TCompose>;

4

package.json
{
"name": "react-twc",
"version": "1.2.2",
"version": "1.3.0",
"description": "Create reusable Tailwind CSS components with React.",

@@ -8,4 +8,4 @@ "type": "module",

".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"

@@ -12,0 +12,0 @@ }

@@ -11,3 +11,3 @@ ![TWC — Supercharge React + Tailwind CSS](.github/assets/banner.png "TWC — Supercharge React + Tailwind CSS")

- ⚡️ Lightweight — only 0.46kb
- ⚡️ Lightweight — only 0.49kb
- ✨ Autocompletion in all editors

@@ -14,0 +14,0 @@ - 🎨 Adapt the style based on props

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