Skip to content

Commit 6790763

Browse files
authored
docs(button): fix icon usage (#2513)
1 parent 9dcd814 commit 6790763

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/api/button.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,17 +358,17 @@ export class ButtonExample {
358358

359359
<!-- Icons -->
360360
<ion-button>
361-
<ion-icon slot="start" name="star"></ion-icon>
361+
<ion-icon slot="start" :icon="star"></ion-icon>
362362
Left Icon
363363
</ion-button>
364364

365365
<ion-button>
366366
Right Icon
367-
<ion-icon slot="end" name="star"></ion-icon>
367+
<ion-icon slot="end" :icon="star"></ion-icon>
368368
</ion-button>
369369

370370
<ion-button>
371-
<ion-icon slot="icon-only" name="star"></ion-icon>
371+
<ion-icon slot="icon-only" :icon="star"></ion-icon>
372372
</ion-button>
373373

374374
<!-- Sizes -->
@@ -378,11 +378,15 @@ export class ButtonExample {
378378
</template>
379379

380380
<script>
381-
import { IonButton } from '@ionic/vue';
381+
import { IonButton, IonIcon } from '@ionic/vue';
382382
import { defineComponent } from 'vue';
383+
import { star } from 'ionicons/icons';
383384
384385
export default defineComponent({
385-
components: { IonButton }
386+
components: { IonButton, IonIcon },
387+
setup() {
388+
return { star }
389+
}
386390
});
387391
</script>
388392
```

0 commit comments

Comments
 (0)