Skip to content

Commit

Permalink
fix(templates): fix icon parsing in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanvanherwijnen committed Sep 11, 2023
1 parent aad801d commit a212e7f
Show file tree
Hide file tree
Showing 6 changed files with 387 additions and 583 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-sloths-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@simple-site-generator/templates': patch
---

fix(templates): fix icon parsing in templates
2 changes: 1 addition & 1 deletion packages/templates/src/documentation/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
v-ripple
>
<q-item-section avatar>
<q-icon :name="page.icon" />
<q-icon :name="page.icon.name" />
</q-item-section>
<q-item-section>{{ page.label }}</q-item-section>
</q-item>
Expand Down
8 changes: 7 additions & 1 deletion packages/templates/src/documentation/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
<div v-if="lists">
<q-list v-for="list in lists" :key="list.header" :dense="list.dense">
<q-item-label header v-if="list.header">{{ list.header }}</q-item-label>
<q-item v-for="item in list.items" :key="item.label">
<q-item
v-for="item in list.items"
:key="item.label"
:clickable="item.href !== void 0"
:href="item.href"
>
<q-item-section avatar v-if="item.icon">
<q-icon :color="item.icon.color" :name="item.icon.name" />
</q-item-section>
Expand Down Expand Up @@ -87,6 +92,7 @@ export interface PageProps {
label: string
overline?: string
caption?: string
href?: string
icon?: {
name: string
color?: string
Expand Down
2 changes: 1 addition & 1 deletion packages/templates/src/small-business/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
v-ripple
>
<q-item-section avatar>
<q-icon :name="page.icon" />
<q-icon :name="page.icon.name" />
</q-item-section>
<q-item-section>{{ page.label }}</q-item-section>
</q-item>
Expand Down
3 changes: 2 additions & 1 deletion packages/templates/src/small-business/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<q-item
v-for="item in list.items"
:key="item.label"
:clickable="item.href!!"
:clickable="item.href !== void 0"
:href="item.href"
>
<q-item-section avatar v-if="item.icon">
Expand Down Expand Up @@ -92,6 +92,7 @@ export interface PageProps {
label: string
overline?: string
caption?: string
href?: string
icon?: {
name: string
color?: string
Expand Down
Loading

0 comments on commit a212e7f

Please sign in to comment.