@mekari/pixel-button-icon
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -16,3 +16,3 @@ 'use strict'; | ||
* @prop {string} size - Size of button icon. | ||
* @prop {string} icon - Displayed icon on center. | ||
* @prop {string} icon - Displayed icon on center. **deprecated** | ||
* @prop {string} name - Displayed icon on center. | ||
@@ -41,2 +41,3 @@ * @prop {boolean} isDisabled - If true, button icon will be disabled. | ||
icon: [String], | ||
// **deprecated** | ||
name: [String], | ||
@@ -145,3 +146,3 @@ isDisabled: { | ||
created() { | ||
if (typeof this.$props.icon !== 'undefined') console.warn('[Pixel warn]: Deprecated warning on `icon` prop and use `name` instead, will removed in next version.'); | ||
if (typeof this.$props.icon !== 'undefined') console.error('[Pixel error]: Deprecated on `icon` prop and use `name` instead.'); | ||
}, | ||
@@ -148,0 +149,0 @@ |
@@ -16,3 +16,3 @@ 'use strict'; | ||
* @prop {string} size - Size of button icon. | ||
* @prop {string} icon - Displayed icon on center. | ||
* @prop {string} icon - Displayed icon on center. **deprecated** | ||
* @prop {string} name - Displayed icon on center. | ||
@@ -41,2 +41,3 @@ * @prop {boolean} isDisabled - If true, button icon will be disabled. | ||
icon: [String], | ||
// **deprecated** | ||
name: [String], | ||
@@ -145,3 +146,3 @@ isDisabled: { | ||
created() { | ||
if (typeof this.$props.icon !== 'undefined') console.warn('[Pixel warn]: Deprecated warning on `icon` prop and use `name` instead, will removed in next version.'); | ||
if (typeof this.$props.icon !== 'undefined') console.error('[Pixel error]: Deprecated on `icon` prop and use `name` instead.'); | ||
}, | ||
@@ -148,0 +149,0 @@ |
@@ -12,3 +12,3 @@ import { MpButton } from '@mekari/pixel-button'; | ||
* @prop {string} size - Size of button icon. | ||
* @prop {string} icon - Displayed icon on center. | ||
* @prop {string} icon - Displayed icon on center. **deprecated** | ||
* @prop {string} name - Displayed icon on center. | ||
@@ -37,2 +37,3 @@ * @prop {boolean} isDisabled - If true, button icon will be disabled. | ||
icon: [String], | ||
// **deprecated** | ||
name: [String], | ||
@@ -141,3 +142,3 @@ isDisabled: { | ||
created() { | ||
if (typeof this.$props.icon !== 'undefined') console.warn('[Pixel warn]: Deprecated warning on `icon` prop and use `name` instead, will removed in next version.'); | ||
if (typeof this.$props.icon !== 'undefined') console.error('[Pixel error]: Deprecated on `icon` prop and use `name` instead.'); | ||
}, | ||
@@ -144,0 +145,0 @@ |
{ | ||
"name": "@mekari/pixel-button-icon", | ||
"description": "Mekari Pixel | Displays a single less important action a user can take component", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"homepage": "https://mekari.design/", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -26,9 +26,12 @@ import { MpButton } from '@mekari/pixel-button' | ||
}) | ||
}, | ||
} | ||
}, | ||
created() { | ||
if (typeof this.$props.icon !== 'undefined') console.warn('[Pixel warn]: Deprecated warning on `icon` prop and use `name` instead, will removed in next version.') | ||
if (typeof this.$props.icon !== 'undefined') | ||
console.error('[Pixel error]: Deprecated on `icon` prop and use `name` instead.') | ||
}, | ||
render(h) { | ||
return h(MpButton, { | ||
return h( | ||
MpButton, | ||
{ | ||
props: this.$props, | ||
@@ -40,15 +43,17 @@ attrs: { | ||
on: this.$listeners | ||
}, [ | ||
h(MpIcon, { | ||
props: { | ||
name: this.name || this.icon, | ||
size: this.size | ||
}, | ||
attrs: { | ||
color: 'currentColor', | ||
focusable: false | ||
} | ||
}) | ||
]) | ||
}, | ||
[ | ||
h(MpIcon, { | ||
props: { | ||
name: this.name || this.icon, | ||
size: this.size | ||
}, | ||
attrs: { | ||
color: 'currentColor', | ||
focusable: false | ||
} | ||
}) | ||
] | ||
) | ||
} | ||
} |
@@ -8,3 +8,3 @@ /** | ||
* @prop {string} size - Size of button icon. | ||
* @prop {string} icon - Displayed icon on center. | ||
* @prop {string} icon - Displayed icon on center. **deprecated** | ||
* @prop {string} name - Displayed icon on center. | ||
@@ -24,3 +24,3 @@ * @prop {boolean} isDisabled - If true, button icon will be disabled. | ||
size: { type: [String], default: 'sm' }, | ||
icon: [String], | ||
icon: [String], // **deprecated** | ||
name: [String], | ||
@@ -33,2 +33,2 @@ isDisabled: { type: [Boolean], default: false }, | ||
ariaLabelledBy: [String] | ||
} | ||
} |
@@ -12,11 +12,13 @@ /** | ||
outline: '0px solid transparent', | ||
_hover: isHoverable ? { | ||
cursor: 'pointer', | ||
color: 'blue.400', | ||
backgroundColor: 'ice.50' | ||
} : { | ||
cursor: 'pointer', | ||
color: 'gray.600', | ||
backgroundColor: 'transparent' | ||
}, | ||
_hover: isHoverable | ||
? { | ||
cursor: 'pointer', | ||
color: 'blue.400', | ||
backgroundColor: 'ice.50' | ||
} | ||
: { | ||
cursor: 'pointer', | ||
color: 'gray.600', | ||
backgroundColor: 'transparent' | ||
}, | ||
_focus: { | ||
@@ -43,3 +45,3 @@ boxShadow: 'outer' | ||
minWidth: '9', | ||
padding: '1.5', | ||
padding: '1.5' | ||
}, | ||
@@ -49,3 +51,3 @@ sm: { | ||
minWidth: '7', | ||
padding: '1', | ||
padding: '1' | ||
} | ||
@@ -52,0 +54,0 @@ } |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
17188
613
0