1
0
Fork 0
mirror of https://github.com/archtechx/alpine-typescript.git synced 2025-12-11 22:34:03 +00:00
This commit is contained in:
Samuel Štancl 2021-02-27 00:12:29 +01:00 committed by GitHub
parent 9444b8bb63
commit acc2715d56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ import DarkModeToggle from './darkModeToggle';
Alpine.component('darkModeToggle', DarkModeToggle);
```
**Use it a template**
**Use it in a template**
```html
<div x-data="Alpine.component('darkModeToggle')()" x-init="init()">
<button type="button" @click="switchTheme()">Switch theme</button>