@gemeente-denhaag/link
Advanced tools
Comparing version 0.2.3-alpha.297 to 0.2.3-alpha.298
@@ -61,3 +61,3 @@ import React from 'react'; | ||
*/ | ||
component?: React.ElementType | undefined; | ||
component?: React.ElementType; | ||
} | ||
@@ -64,0 +64,0 @@ /** |
@@ -108,3 +108,3 @@ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var React=require('react');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var React__default=/*#__PURE__*/_interopDefaultLegacy(React);/****************************************************************************** | ||
var Link = function (_a) { | ||
var href = _a.href, id = _a.id, _b = _a.children, children = _b === void 0 ? undefined : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.icon, icon = _d === void 0 ? undefined : _d, _e = _a.iconAlign, iconAlign = _e === void 0 ? 'end' : _e, _f = _a.tabIndex, tabIndex = _f === void 0 ? 0 : _f, _g = _a.component, component = _g === void 0 ? undefined : _g, props = __rest(_a, ["href", "id", "children", "disabled", "icon", "iconAlign", "tabIndex", "component"]); | ||
var href = _a.href, id = _a.id, _b = _a.children, children = _b === void 0 ? undefined : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.icon, icon = _d === void 0 ? undefined : _d, _e = _a.iconAlign, iconAlign = _e === void 0 ? 'end' : _e, _f = _a.tabIndex, tabIndex = _f === void 0 ? 0 : _f, props = __rest(_a, ["href", "id", "children", "disabled", "icon", "iconAlign", "tabIndex"]); | ||
var rootClassNames = clsx('denhaag-link', { | ||
@@ -118,4 +118,3 @@ 'denhaag-link--disabled': disabled, | ||
var iconWrapped = React__default["default"].createElement("span", { className: iconClassName }, icon); | ||
var Component = component || 'a'; | ||
return (React__default["default"].createElement(Component, __assign({ id: id, href: href, tabIndex: disabled ? -1 : tabIndex }, props, { className: rootClassNames }), | ||
return (React__default["default"].createElement("a", __assign({ id: id, href: href, tabIndex: disabled ? -1 : tabIndex }, props, { className: rootClassNames }), | ||
icon !== undefined && iconAlign === 'start' ? iconWrapped : '', | ||
@@ -122,0 +121,0 @@ React__default["default"].createElement("span", null, children), |
@@ -61,3 +61,3 @@ import React from 'react'; | ||
*/ | ||
component?: React.ElementType | undefined; | ||
component?: React.ElementType; | ||
} | ||
@@ -64,0 +64,0 @@ /** |
@@ -108,3 +108,3 @@ import React from'react';/****************************************************************************** | ||
var Link = function (_a) { | ||
var href = _a.href, id = _a.id, _b = _a.children, children = _b === void 0 ? undefined : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.icon, icon = _d === void 0 ? undefined : _d, _e = _a.iconAlign, iconAlign = _e === void 0 ? 'end' : _e, _f = _a.tabIndex, tabIndex = _f === void 0 ? 0 : _f, _g = _a.component, component = _g === void 0 ? undefined : _g, props = __rest(_a, ["href", "id", "children", "disabled", "icon", "iconAlign", "tabIndex", "component"]); | ||
var href = _a.href, id = _a.id, _b = _a.children, children = _b === void 0 ? undefined : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.icon, icon = _d === void 0 ? undefined : _d, _e = _a.iconAlign, iconAlign = _e === void 0 ? 'end' : _e, _f = _a.tabIndex, tabIndex = _f === void 0 ? 0 : _f, props = __rest(_a, ["href", "id", "children", "disabled", "icon", "iconAlign", "tabIndex"]); | ||
var rootClassNames = clsx('denhaag-link', { | ||
@@ -118,4 +118,3 @@ 'denhaag-link--disabled': disabled, | ||
var iconWrapped = React.createElement("span", { className: iconClassName }, icon); | ||
var Component = component || 'a'; | ||
return (React.createElement(Component, __assign({ id: id, href: href, tabIndex: disabled ? -1 : tabIndex }, props, { className: rootClassNames }), | ||
return (React.createElement("a", __assign({ id: id, href: href, tabIndex: disabled ? -1 : tabIndex }, props, { className: rootClassNames }), | ||
icon !== undefined && iconAlign === 'start' ? iconWrapped : '', | ||
@@ -122,0 +121,0 @@ React.createElement("span", null, children), |
{ | ||
"name": "@gemeente-denhaag/link", | ||
"version": "0.2.3-alpha.297", | ||
"version": "0.2.3-alpha.298", | ||
"description": "A Link component", | ||
@@ -32,4 +32,4 @@ "bugs": "https://github.com/nl-design-system/denhaag/issues", | ||
"dependencies": { | ||
"@gemeente-denhaag/baseprops": "0.2.3-alpha.297", | ||
"@gemeente-denhaag/icons": "0.2.3-alpha.297" | ||
"@gemeente-denhaag/baseprops": "0.2.3-alpha.298", | ||
"@gemeente-denhaag/icons": "0.2.3-alpha.298" | ||
}, | ||
@@ -39,3 +39,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "74180f868afd4e0276623ef6c6eb9c74817b42ad" | ||
"gitHead": "a65fa4e4baae0a59176cc38e9968bcf22ca60bce" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112266
474
+ Added@gemeente-denhaag/baseprops@0.2.3-alpha.298(transitive)
+ Added@gemeente-denhaag/icons@0.2.3-alpha.298(transitive)
- Removed@gemeente-denhaag/baseprops@0.2.3-alpha.297(transitive)
- Removed@gemeente-denhaag/icons@0.2.3-alpha.297(transitive)