@codewithshin/svelte-utterances
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "@codewithshin/svelte-utterances", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Svelte Utterances Component", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -5,4 +5,5 @@ # svelte-utterances | ||
[Svelte-utterances](https://svelte-utterances.vercel.app/) | ||
[Svelte-Utterances Demo](https://svelte-utterances.vercel.app/) | ||
## Installation | ||
@@ -14,2 +15,8 @@ | ||
After cloning this repo, you can see Svelte-Utterances in action in the demo-site branch. | ||
```sh | ||
git checkout demo-site | ||
``` | ||
## Props | ||
@@ -61,4 +68,25 @@ | ||
### Dynamic theme switching | ||
Check more details [Svelte-Utterances](https://svelte-utterances.vercel.app/) | ||
## Theme switch | ||
You can toggle between two themes. | ||
```html | ||
<script> | ||
import Utterances from "@codewithshin/svelte-utterances"; | ||
import {Button} from 'flowbite-svelte' | ||
let theme = "github-light"; | ||
const switchTheme = () => { | ||
theme = theme === "github-light" ? "github-dark" : "github-light"; | ||
}; | ||
</script> | ||
<Button on:click={switchTheme} name="Toggle theme" /> | ||
<Utterances reponame="shinokada/svelte-utterances" {theme} /> | ||
``` | ||
## Dynamic theme switching | ||
This is an example of how to reactively change the theme. | ||
@@ -72,3 +100,3 @@ | ||
```js | ||
```html | ||
<script> | ||
@@ -75,0 +103,0 @@ import { Utterances } from "@codewithshin/svelte-utterances"; |
@@ -5,3 +5,3 @@ /** @typedef {typeof __propDef.props} UtterancesProps */ | ||
export default class Utterances extends SvelteComponentTyped<{ | ||
reponame: any; | ||
reponame: string; | ||
issueTerm?: string; | ||
@@ -20,3 +20,3 @@ label?: string; | ||
props: { | ||
reponame: any; | ||
reponame: string; | ||
issueTerm?: string; | ||
@@ -23,0 +23,0 @@ label?: string; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6818
7
136