diff --git a/code/websites/pokedex.online/src/components/shared/BaseButton.vue b/code/websites/pokedex.online/src/components/shared/BaseButton.vue
index b7be3fb..923eb57 100644
--- a/code/websites/pokedex.online/src/components/shared/BaseButton.vue
+++ b/code/websites/pokedex.online/src/components/shared/BaseButton.vue
@@ -6,13 +6,19 @@
@click="handleClick"
>
-
+
{{ icon }}
-
+
{{ icon }}
@@ -29,9 +35,10 @@ const props = defineProps({
variant: {
type: String,
default: 'primary',
- validator: (value) => ['primary', 'secondary', 'danger', 'ghost', 'icon-only'].includes(value)
+ validator: value =>
+ ['primary', 'secondary', 'danger', 'ghost', 'icon-only'].includes(value)
},
-
+
/**
* Button size
* @type {'small' | 'medium' | 'large'}
@@ -39,9 +46,9 @@ const props = defineProps({
size: {
type: String,
default: 'medium',
- validator: (value) => ['small', 'medium', 'large'].includes(value)
+ validator: value => ['small', 'medium', 'large'].includes(value)
},
-
+
/**
* Whether button is in loading state
*/
@@ -49,7 +56,7 @@ const props = defineProps({
type: Boolean,
default: false
},
-
+
/**
* Whether button is disabled
*/
@@ -57,7 +64,7 @@ const props = defineProps({
type: Boolean,
default: false
},
-
+
/**
* Icon character or emoji to display
*/
@@ -65,7 +72,7 @@ const props = defineProps({
type: String,
default: null
},
-
+
/**
* Icon position relative to text
* @type {'left' | 'right'}
@@ -73,9 +80,9 @@ const props = defineProps({
iconPosition: {
type: String,
default: 'left',
- validator: (value) => ['left', 'right'].includes(value)
+ validator: value => ['left', 'right'].includes(value)
},
-
+
/**
* Whether button should take full width of container
*/
@@ -83,7 +90,7 @@ const props = defineProps({
type: Boolean,
default: false
},
-
+
/**
* Button type attribute
* @type {'button' | 'submit' | 'reset'}
@@ -91,7 +98,7 @@ const props = defineProps({
type: {
type: String,
default: 'button',
- validator: (value) => ['button', 'submit', 'reset'].includes(value)
+ validator: value => ['button', 'submit', 'reset'].includes(value)
}
});
@@ -105,11 +112,12 @@ const buttonClasses = computed(() => [
'base-button--loading': props.loading,
'base-button--disabled': props.disabled,
'base-button--full-width': props.fullWidth,
- 'base-button--icon-only': props.variant === 'icon-only' || (!props.$slots.default && props.icon)
+ 'base-button--icon-only':
+ props.variant === 'icon-only' || (!props.$slots.default && props.icon)
}
]);
-const handleClick = (event) => {
+const handleClick = event => {
if (!props.disabled && !props.loading) {
emit('click', event);
}