@codewithshin/svelte-utterances
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "@codewithshin/svelte-utterances", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Svelte Utterances Component", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -63,19 +63,36 @@ # svelte-utterances | ||
Install `Flowbite-Svelte`: | ||
```sh | ||
npm i -D flowbite-svelte | ||
``` | ||
```js | ||
<script> | ||
import { Utterances } from '@codewithshin/svelte-utterances' | ||
let theme = 'github-light'; | ||
const switchTheme = () => { | ||
theme = theme === 'github-light' ? 'github-dark' : 'github-light'; | ||
} | ||
import { Utterances } from "@codewithshin/svelte-utterances"; | ||
import { Select } from "flowbite-svelte"; | ||
let theme = "github-light"; | ||
let selectprops = { | ||
id: "theme-select", | ||
name: "theme-select", | ||
label: "Select your theme", | ||
}; | ||
let selectClass = | ||
"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-48 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"; | ||
</script> | ||
<button on:click={switchTheme}> | ||
<div class="my-16 relative"> | ||
<Select {...selectprops} bind:value={theme} {selectClass}> | ||
<option value="github-light">GitHub Light</option> | ||
<option value="github-dark">GitHub Dark</option> | ||
<option value="github-dark-orange">GitHub Dark Orange</option> | ||
<option value="icy-dark">Icy Dark</option> | ||
<option value="dark-blue">Dark Blue</option> | ||
<option value="photon-dark">Photon Dark</option> | ||
<option value="boxy-light">Boxy Light</option> | ||
<option value="gruvbox-dark">Gruvbox Dark</option> | ||
</Select> | ||
<Utterances | ||
theme={theme} | ||
reponame="yourname/repo-name" | ||
/> | ||
<Utterances reponame="shinokada/svelte-utterances" {theme} /> | ||
</div> | ||
``` | ||
@@ -82,0 +99,0 @@ |
@@ -6,4 +6,4 @@ /** @typedef {typeof __propDef.props} UtterancesProps */ | ||
reponame: any; | ||
issueTerm?: string; | ||
label?: string; | ||
issueTerm?: string; | ||
theme?: string; | ||
@@ -21,4 +21,4 @@ }, { | ||
reponame: any; | ||
issueTerm?: string; | ||
label?: string; | ||
issueTerm?: string; | ||
theme?: string; | ||
@@ -25,0 +25,0 @@ }; |
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
5370
108