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

kzkzkz

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kzkzkz - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

21

components/button/Button.d.ts

@@ -1,11 +0,8 @@

import { FC, MouseEventHandler } from "react";
type Variant = "primary" | "secondary" | "tertiary";
import React, { MouseEventHandler } from "react";
type Variant = "primary" | "secondary" | "tertiary" | "primaryInverse" | "tertiaryInverse";
type Size = "small" | "medium" | "large";
export interface Button {
export interface Button extends React.ButtonHTMLAttributes<HTMLButtonElement> {
className?: string;
content: string;
variant?: Variant;
size?: Size;
inverse?: boolean;
icon?: boolean;
disabled?: boolean;

@@ -16,10 +13,10 @@ onClick?: MouseEventHandler;

variant?: "secondary";
destructive?: never;
variantColor?: never;
} | {
variant: "primary" | "tertiary";
destructive?: Boolean;
variant?: "primary" | "tertiary";
variantColor?: "inverse" | "destructive";
};
type AriaLabel = {
icon?: false;
ariaLabel: never;
ariaLabel?: never;
} | {

@@ -29,4 +26,4 @@ icon: true;

};
type Props = Button & Destructive & AriaLabel;
export declare const Button: FC<Props>;
export type ButtonProps = Button & AriaLabel & Destructive;
export declare const Button: (props: ButtonProps) => JSX.Element;
export {};

@@ -1,27 +0,37 @@

import m from "react";
const d = "_kbutton_1yzq7_2", l = "_primary_1yzq7_17", q = "_destructive_1yzq7_33", z = "_secondary_1yzq7_48", v = "_tertiary_1yzq7_67", b = "_inverse_1yzq7_87", $ = "_large_1yzq7_102", p = "_icon_1yzq7_107", k = "_medium_1yzq7_110", g = "_small_1yzq7_118", t = {
kbutton: d,
primary: l,
import d from "react";
const u = "_kbutton_1yzq7_2", z = "_primary_1yzq7_17", q = "_destructive_1yzq7_33", b = "_secondary_1yzq7_48", v = "_tertiary_1yzq7_67", $ = "_inverse_1yzq7_87", k = "_large_1yzq7_102", p = "_icon_1yzq7_107", g = "_medium_1yzq7_110", C = "_small_1yzq7_118", t = {
kbutton: u,
primary: z,
destructive: q,
secondary: z,
secondary: b,
tertiary: v,
inverse: b,
large: $,
inverse: $,
large: k,
icon: p,
medium: k,
small: g
}, x = ({ content: n, variant: r = "secondary", size: o = "medium", className: e, inverse: _, destructive: s = !1, icon: c, ariaLabel: i, disabled: y, onClick: a }) => {
const u = `
medium: g,
small: C
}, h = (n) => {
const {
variant: r = "secondary",
size: o = "medium",
className: e,
variantColor: s,
icon: a,
ariaLabel: c,
disabled: i,
onClick: _,
style: y,
children: l
} = n, m = `
${t.kbutton}
${t[r]}
${t[o]}
${_ && t.inverse}
${s && t.destructive}
${s}
${e != null ? e : ""}
${c && t.icon}
${a && t.icon}
`;
return m.createElement("button", { disabled: y, "aria-label": i, className: u, onClick: a }, n);
return d.createElement("button", { disabled: i, "aria-label": c, className: m, onClick: _, style: y }, l);
};
export {
x as Button
h as Button
};
{
"name": "kzkzkz",
"version": "0.0.4",
"version": "0.0.5",
"type": "module",

@@ -5,0 +5,0 @@ "main": "index.js",

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