diff --git a/components/lib/button/Button.vue b/components/lib/button/Button.vue index 5134e3ddb..d2c6e2464 100755 --- a/components/lib/button/Button.vue +++ b/components/lib/button/Button.vue @@ -8,7 +8,7 @@ - {{ label || ' ' }} + {{ label }} diff --git a/components/lib/button/style/ButtonStyle.js b/components/lib/button/style/ButtonStyle.js index a52cfc8af..81487e00e 100644 --- a/components/lib/button/style/ButtonStyle.js +++ b/components/lib/button/style/ButtonStyle.js @@ -6,9 +6,7 @@ const classes = { { 'p-button-icon-only': instance.hasIcon && !props.label && !props.badge, 'p-button-vertical': (props.iconPos === 'top' || props.iconPos === 'bottom') && props.label, - 'p-disabled': instance.$attrs.disabled || instance.$attrs.disabled === '' || props.loading, 'p-button-loading': props.loading, - 'p-button-loading-label-only': props.loading && !instance.hasIcon && props.label, 'p-button-link': props.link, [`p-button-${props.severity}`]: props.severity, 'p-button-raised': props.raised, @@ -20,14 +18,11 @@ const classes = { 'p-button-plain': props.plain } ], - loadingIcon: 'p-button-loading-icon pi-spin', + loadingIcon: 'p-button-loading-icon', icon: ({ props }) => [ 'p-button-icon', { - 'p-button-icon-left': props.iconPos === 'left' && props.label, - 'p-button-icon-right': props.iconPos === 'right' && props.label, - 'p-button-icon-top': props.iconPos === 'top' && props.label, - 'p-button-icon-bottom': props.iconPos === 'bottom' && props.label + [`p-button-icon-${props.iconPos}`]: props.label } ], label: 'p-button-label' diff --git a/components/lib/themes/primeone/base/button/index.js b/components/lib/themes/primeone/base/button/index.js index 8713c9d8e..b9be4de34 100644 --- a/components/lib/themes/primeone/base/button/index.js +++ b/components/lib/themes/primeone/base/button/index.js @@ -18,28 +18,19 @@ export default { transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, outline-color ${dt('transition.duration')}; border-radius: ${dt('rounded.base')}; outline-color: transparent; + gap: 0.5rem; } .p-button:disabled { cursor: default; } -.p-button-icon-left { - margin-right: 0.5rem; -} - .p-button-icon-right { order: 1; - margin-left: 0.5rem; -} - -.p-button-icon-top { - margin-bottom: 0.5rem; } .p-button-icon-bottom { order: 2; - margin-top: 0.5rem; } .p-button-icon-only { @@ -48,16 +39,6 @@ export default { padding: 0.5rem 0; } -.p-button-icon-only .p-button-label { - visibility: hidden; - width: 0; -} - -.p-button.p-button-icon-only .p-button-icon-left, -.p-button.p-button-icon-only .p-button-icon-right { - margin: 0; -} - .p-button-icon-only.p-button-rounded { border-radius: 50%; height: 2.5rem; @@ -81,14 +62,6 @@ export default { font-size: 1.25rem; } -.p-button-loading-label-only .p-button-label { - margin-left: 0.5rem; -} - -.p-button-loading-label-only .p-button-loading-icon { - margin-right: 0; -} - .p-button-vertical { flex-direction: column; }