|
27 | 27 | A Vue Component |
28 | 28 | <span class="is-pulled-right"> |
29 | 29 | <!-- Place this tag where you want the button to render. --> |
30 | | -<a class="github-button" href="https://github.com/PygmySlowLoris/vue-fab" data-icon="octicon-star" data-size="large" aria-label="Star PygmySlowLoris/vue-fab on GitHub">Star</a> |
| 30 | +<a class="github-button" href="https://github.com/PygmySlowLoris/vue-fab" data-icon="octicon-star" data-size="large" |
| 31 | + aria-label="Star PygmySlowLoris/vue-fab on GitHub">Star</a> |
31 | 32 | </span> |
32 | 33 | </h2> |
33 | 34 | </div> |
|
52 | 53 | </div> |
53 | 54 | <div class="content"> |
54 | 55 | <div class="columns"> |
55 | | - <div class="column is-5" style="display: flex; justify-content: center"> |
| 56 | + <div class="column is-4" style="display: flex; justify-content: center"> |
56 | 57 | <div class="field is-pulled-left"> |
57 | 58 | <label class="label">Color</label> |
58 | 59 | <p class="control"> |
|
93 | 94 | </span> |
94 | 95 | </p> |
95 | 96 | </div> |
| 97 | + <div class="field has-text-left"> |
| 98 | + <label class="label">Tooltip event</label> |
| 99 | + <p class="control is-expandend"> |
| 100 | + <span class="select is-fullwidth"> |
| 101 | + <select v-model="tooltipEvent"> |
| 102 | + <option v-for="type in tooltipEvents">{{type}}</option> |
| 103 | + </select> |
| 104 | + </span> |
| 105 | + </p> |
| 106 | + </div> |
96 | 107 | </div> |
97 | 108 | </div> |
98 | | - <label class="label" style="display: flex; align-items: center; padding-right: 1rem;"> |
| 109 | + <label class="label" |
| 110 | + style="display: flex; align-items: center; padding-right: 1rem;"> |
99 | 111 | Main Icon & Tooltip |
100 | 112 | </label> |
101 | 113 | <div class="field is-horizontal"> |
|
112 | 124 | </div> |
113 | 125 | </div> |
114 | 126 | </div> |
115 | | - <label class="label" style="display: flex; align-items: center; padding-right: 1rem;"> |
| 127 | + <label class="label" |
| 128 | + style="display: flex; align-items: center; padding-right: 1rem;"> |
116 | 129 | First Icon & Tooltip |
117 | 130 | </label> |
118 | 131 | <div class="field is-horizontal"> |
|
129 | 142 | </div> |
130 | 143 | </div> |
131 | 144 | </div> |
132 | | - <label class="label" style="display: flex; align-items: center; padding-right: 1rem;"> |
| 145 | + <label class="label" |
| 146 | + style="display: flex; align-items: center; padding-right: 1rem;"> |
133 | 147 | Second Icon & Tooltip |
134 | 148 | </label> |
135 | 149 | <div class="field is-horizontal"> |
|
183 | 197 | :main-tooltip="mainTooltip" |
184 | 198 | :actions="[{name: 'alertMe',icon: firstIcon, tooltip: firstTooltip, color:'#d11014'},{name: 'alertMe',icon: secondIcon, tooltip: secondTooltip}]" |
185 | 199 | @alertMe="alert" |
| 200 | + :fixed-tooltip="fixedTooltip" |
186 | 201 | ></fab> |
187 | 202 | </div> |
188 | 203 | </template> |
|
237 | 252 | 'fixed', |
238 | 253 | 'absolute' |
239 | 254 | ], |
| 255 | + tooltipEvents: [ |
| 256 | + 'hover', |
| 257 | + 'fixed' |
| 258 | + ], |
240 | 259 | sizes: [ |
241 | 260 | 'small', |
242 | 261 | 'medium', |
243 | 262 | 'large' |
244 | 263 | ], |
245 | 264 | position: 'bottom-right', |
246 | 265 | positionType: 'fixed', |
| 266 | + tooltipEvent: 'hover', |
247 | 267 | iconSizes: 'medium', |
248 | 268 | colors: defaultProps, |
249 | 269 | mainIcon: 'add', |
|
254 | 274 | secondTooltip: 'add_alert' |
255 | 275 | } |
256 | 276 | }, |
| 277 | + computed: { |
| 278 | + fixedTooltip() { |
| 279 | + return this.tooltipEvent === 'fixed'; |
| 280 | + } |
| 281 | + }, |
257 | 282 | methods: { |
258 | 283 | alert(){ |
259 | 284 | alert('You have clicked me :)'); |
|
287 | 312 | border-top: dashed 1px; |
288 | 313 | } |
289 | 314 |
|
290 | | -
|
291 | 315 | li { |
292 | 316 | display: inline-block; |
293 | 317 | margin: 0 10px; |
|
329 | 353 | } |
330 | 354 |
|
331 | 355 | .vertical-separator { |
332 | | - display: flex; justify-content: space-around; |
| 356 | + display: flex; |
| 357 | + justify-content: space-around; |
333 | 358 | } |
334 | 359 |
|
335 | 360 | .vertical-separator .line { |
|
0 commit comments