|
33 | 33 | // Computed
|
34 | 34 | const text = computed(() => props?.field?.text || null);
|
35 | 35 | const icon = computed(() => props?.field?.icon || null);
|
36 |
| - const name = computed(() => props?.field?.name || null); |
| 36 | + const name = computed(() => props?.field?.name || props?.field?.title || null); |
37 | 37 | const customStyles = computed(() => props?.field?.styles || []);
|
38 | 38 | const customClasses = computed(() => props?.field?.classes || []);
|
39 | 39 | const asToolbarButton = computed(() => props?.field?.asToolbarButton === true);
|
40 | 40 |
|
41 | 41 | const actionButtonClasses = computed(() => [
|
42 | 42 | 'flex-shrink-0', 'shadow', 'rounded', 'focus:outline-none', 'ring-primary-200', 'dark:ring-gray-600',
|
43 | 43 | 'focus:ring', 'bg-primary-500', 'hover:bg-primary-400', 'active:bg-primary-600',
|
44 |
| - 'text-white', 'dark:text-gray-800', 'inline-flex', 'items-center', 'font-bold', 'px-2', 'h-9', 'text-sm', 'flex-shrink-0', |
| 44 | + 'text-white', 'dark:text-gray-800', 'inline-flex', 'items-center', 'font-bold', 'px-2', 'mx-1', 'h-9', 'text-sm', 'flex-shrink-0', |
45 | 45 | ])
|
46 | 46 | const toolbarButtonClasses = computed(() => [
|
47 | 47 | 'toolbar-button', 'hover:text-primary-500', 'px-2', 'v-popper--has-tooltip', 'w-10'
|
48 | 48 | ])
|
49 | 49 |
|
50 |
| - const finalStyles = computed(() => ({...(customStyles.value || {})})) |
51 |
| - const finalClasses = computed(() => [...(asToolbarButton?.value === true ? toolbarButtonClasses.value : actionButtonClasses.value), ...(customClasses.value || [])]) |
| 50 | + // Computed |
| 51 | + // Get action button styles |
| 52 | + const actionButtonStyles = computed(() => { |
| 53 | + return { |
| 54 | + margin: '0 2px', |
| 55 | + } |
| 56 | + }) |
| 57 | +
|
| 58 | +
|
| 59 | + // Computed |
| 60 | + // Get final styles |
| 61 | + const finalStyles = computed(() => { |
| 62 | + return { |
| 63 | + ...(asToolbarButton?.value === true ? null : actionButtonStyles?.value), |
| 64 | + ...(customStyles.value || {}), |
| 65 | + } |
| 66 | + }) |
| 67 | +
|
| 68 | + // Computed |
| 69 | + // Get final classes |
| 70 | + const finalClasses = computed(() => { |
| 71 | + return [ |
| 72 | + ...(asToolbarButton?.value === true ? toolbarButtonClasses.value : actionButtonClasses.value), |
| 73 | + ...(customClasses.value || []) |
| 74 | + ] |
| 75 | + }) |
52 | 76 |
|
53 | 77 | const queryString = computed(() => ({
|
54 | 78 | action: selectedAction?.value?.uriKey,
|
|
0 commit comments