@stianlarsen/react-ui-kit
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -18,2 +18,3 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
const { href, onClick, ...linkProps } = rest; | ||
const { border, ...finalProps } = linkProps; | ||
// Prioritize onClick over href if both are provided | ||
@@ -26,3 +27,3 @@ const linkHandler = onClick | ||
: undefined; | ||
return (_jsx("a", { ...commonProps, href: href, onClick: linkHandler, ...linkProps, children: loading ? (_jsxs("span", { className: "isLoading", children: [_jsx(Loader, {}), loadingText] })) : (children) })); | ||
return (_jsx("a", { ...commonProps, href: href, onClick: linkHandler, ...finalProps, children: loading ? (_jsxs("span", { className: "isLoading", children: [_jsx(Loader, {}), loadingText] })) : (children) })); | ||
} | ||
@@ -29,0 +30,0 @@ else { |
{ | ||
"name": "@stianlarsen/react-ui-kit", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "A versatile React UI kit focused on delivering ready-to-use, customizable buttons for every use case. Designed to save developers time and streamline UI development, this kit offers a range of button styles and loaders, ensuring immediate integration and thematic coherence across projects.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
36956
630