attributes.js
130 lines
| 1 | export default function getIconAttributes( defaults ) { |
| 2 | return { |
| 3 | icon: { |
| 4 | type: 'string', |
| 5 | source: 'html', |
| 6 | selector: '.gb-icon', |
| 7 | }, |
| 8 | hasIcon: { |
| 9 | type: 'boolean', |
| 10 | default: false, |
| 11 | }, |
| 12 | iconColor: { |
| 13 | type: 'string', |
| 14 | default: defaults.iconColor, |
| 15 | }, |
| 16 | iconColorOpacity: { |
| 17 | type: 'number', |
| 18 | default: defaults.iconColorOpacity, |
| 19 | }, |
| 20 | customIcon: { |
| 21 | type: 'boolean', |
| 22 | default: false, |
| 23 | }, |
| 24 | iconLocation: { |
| 25 | type: 'string', |
| 26 | default: defaults.iconLocation, |
| 27 | }, |
| 28 | iconLocationTablet: { |
| 29 | type: 'string', |
| 30 | default: defaults.iconLocationTablet, |
| 31 | }, |
| 32 | iconLocationMobile: { |
| 33 | type: 'string', |
| 34 | default: defaults.iconLocationMobile, |
| 35 | }, |
| 36 | iconVerticalAlignment: { |
| 37 | type: 'string', |
| 38 | default: defaults.iconVerticalAlignment, |
| 39 | }, |
| 40 | iconVerticalAlignmentTablet: { |
| 41 | type: 'string', |
| 42 | default: defaults.iconVerticalAlignmentTablet, |
| 43 | }, |
| 44 | iconVerticalAlignmentMobile: { |
| 45 | type: 'string', |
| 46 | default: defaults.iconVerticalAlignmentMobile, |
| 47 | }, |
| 48 | iconPaddingTop: { |
| 49 | type: 'string', |
| 50 | default: defaults.iconPaddingTop, |
| 51 | }, |
| 52 | iconPaddingRight: { |
| 53 | type: 'string', |
| 54 | default: defaults.iconPaddingRight, |
| 55 | }, |
| 56 | iconPaddingBottom: { |
| 57 | type: 'string', |
| 58 | default: defaults.iconPaddingBottom, |
| 59 | }, |
| 60 | iconPaddingLeft: { |
| 61 | type: 'string', |
| 62 | default: defaults.iconPaddingLeft, |
| 63 | }, |
| 64 | iconPaddingTopTablet: { |
| 65 | type: 'string', |
| 66 | default: defaults.iconPaddingTopTablet, |
| 67 | }, |
| 68 | iconPaddingRightTablet: { |
| 69 | type: 'string', |
| 70 | default: defaults.iconPaddingRightTablet, |
| 71 | }, |
| 72 | iconPaddingBottomTablet: { |
| 73 | type: 'string', |
| 74 | default: defaults.iconPaddingBottomTablet, |
| 75 | }, |
| 76 | iconPaddingLeftTablet: { |
| 77 | type: 'string', |
| 78 | default: defaults.iconPaddingLeftTablet, |
| 79 | }, |
| 80 | iconPaddingTopMobile: { |
| 81 | type: 'string', |
| 82 | default: defaults.iconPaddingTopMobile, |
| 83 | }, |
| 84 | iconPaddingRightMobile: { |
| 85 | type: 'string', |
| 86 | default: defaults.iconPaddingRightMobile, |
| 87 | }, |
| 88 | iconPaddingBottomMobile: { |
| 89 | type: 'string', |
| 90 | default: defaults.iconPaddingBottomMobile, |
| 91 | }, |
| 92 | iconPaddingLeftMobile: { |
| 93 | type: 'string', |
| 94 | default: defaults.iconPaddingLeftMobile, |
| 95 | }, |
| 96 | iconPaddingUnit: { |
| 97 | type: 'string', |
| 98 | default: defaults.iconPaddingUnit, |
| 99 | }, |
| 100 | iconPaddingSyncUnits: { |
| 101 | type: 'boolean', |
| 102 | default: false, |
| 103 | }, |
| 104 | iconSize: { |
| 105 | type: 'number', |
| 106 | default: defaults.iconSize, |
| 107 | }, |
| 108 | iconSizeTablet: { |
| 109 | type: 'number', |
| 110 | default: defaults.iconSizeTablet, |
| 111 | }, |
| 112 | iconSizeMobile: { |
| 113 | type: 'number', |
| 114 | default: defaults.iconSizeMobile, |
| 115 | }, |
| 116 | iconSizeUnit: { |
| 117 | type: 'string', |
| 118 | default: defaults.iconSizeUnit, |
| 119 | }, |
| 120 | removeText: { |
| 121 | type: 'boolean', |
| 122 | default: defaults.removeText, |
| 123 | }, |
| 124 | iconStyles: { |
| 125 | type: 'object', |
| 126 | default: {}, |
| 127 | }, |
| 128 | }; |
| 129 | } |
| 130 |