Skip to content

Commit 8c43442

Browse files
committed
🎨 Adds option to hide sports thumbnail (#654)
1 parent 19b7131 commit 8c43442

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/widgets.md

+1
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ Show recent scores and upcoming matches from your favourite sports team. Data is
714714
**`pastOrFuture`** | `string` | __Optional__ | Set to `past` to show scores for recent games, or `future` to show upcoming games. Defaults to `past`. You can change this within the UI
715715
**`apiKey`** | `string` | __Optional__ | Optionally specify your API key, which you can sign up for at [TheSportsDB.com](https://www.thesportsdb.com/)
716716
**`limit`** | `number` | __Optional__ | To limit output to a certain number of matches, defaults to `15`
717+
**`hideImage`** | `boolean` | __Optional__ | Set to `true` to not render the team / match banner image, defaults to `false`
717718

718719
##### Example
719720

src/components/Widgets/SportsScores.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</div>
2929
<div class="match-row" v-for="match in matches" :key="match.id">
3030
<!-- Banner Image -->
31-
<div class="match-thumbnail-wrap">
31+
<div class="match-thumbnail-wrap" v-if="!hideImage">
3232
<img :src="match.thumbnail" :alt="`${match.title} Banner Image`" class="match-thumbnail" />
3333
</div>
3434
<!-- Team Scores -->
@@ -101,6 +101,9 @@ export default {
101101
pastOrFuture() {
102102
return this.options.pastOrFuture || 'past';
103103
},
104+
hideImage() {
105+
return this.options.hideImage || false;
106+
},
104107
endpoint() {
105108
this.initiate();
106109
const endpoint = widgetApiEndpoints.sportsScores;

0 commit comments

Comments
 (0)