Browse Source

fix: Added iconOnly prop to button for the case of having only icon style

pull/6739/head
Muhammed Mustafa 1 year ago
parent
commit
b8ea49cd36
  1. 3
      packages/nc-gui/components/nc/Button.vue

3
packages/nc-gui/components/nc/Button.vue

@ -20,6 +20,7 @@ interface Props {
type?: ButtonType | 'danger' | 'secondary' | undefined
size?: NcButtonSize
centered?: boolean
iconOnly?: boolean
}
const props = withDefaults(defineProps<Props>(), {
@ -107,7 +108,7 @@ useEventListener(NcButton, 'mousedown', () => {
<slot v-else name="icon" />
<div
v-if="!(size === 'xxsmall' && loading)"
v-if="!(size === 'xxsmall' && loading) && !props.iconOnly"
class="flex flex-row items-center"
:class="{
'font-medium': type === 'primary' || type === 'danger',

Loading…
Cancel
Save