Skip to content

Commit

Permalink
fix check errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-8 committed Apr 24, 2024
1 parent 17177ec commit 86f4fe2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
31 changes: 14 additions & 17 deletions src/lib/data/BadgeArray.variants.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type { Variants } from 'kitbook';
import type Component from './BadgeArray.svelte';
import type { DeprecatedVariant } from 'kitbook'
import type Component from './BadgeArray.svelte'

const books = ['Lord of the Rings', 'www.books.com'];
const books = ['Lord of the Rings', 'www.books.com']

export const variants: Variants<Component> = [
export const variants: DeprecatedVariant<Component>[] = [
{
name: 'Basic display',
props: {
strings: books,
promptMessage: "What is the book name?",
addMessage: "Add Book"
promptMessage: 'What is the book name?',
addMessage: 'Add Book',
},
},
// rtl
Expand All @@ -18,23 +18,20 @@ export const variants: Variants<Component> = [
props: {
canEdit: true,
strings: books,
promptMessage: "What is the book name?",
addMessage: "Add Book"
promptMessage: 'What is the book name?',
addMessage: 'Add Book',
},
},
// editable rtl
{
name: "handles strings",
name: 'handles strings',
props: {
strings: "How about this?" as any as Array<string>,
promptMessage: "Let's see how this works... Add something",
addMessage: "Add Something"
}
}
strings: 'How about this?' as any as string[],
promptMessage: 'Let\'s see how this works... Add something',
addMessage: 'Add Something',
},
},
]

// automatically log events
// on:valueupdated={(e) => console.log('valueupdated', e.detail)}



22 changes: 12 additions & 10 deletions src/lib/shell/Avatar.variants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Variants } from 'kitbook';
import type Component from './Avatar.svelte';
import type { DeprecatedVariant } from 'kitbook'
import type Component from './Avatar.svelte'

export const variants: Variants<Component> = [
export const variants: DeprecatedVariant<Component>[] = [
{
name: 'image',
props: {
Expand All @@ -10,7 +10,7 @@ export const variants: Variants<Component> = [
email: '[email protected]',
photoURL:
'https://lh5.googleusercontent.com/-qCXZXfIkRQ8/AAAAAAAAAAI/AAAAAAAAACc/wAdH8yns3QQ/photo.jpg',
}
},
},
},
{
Expand All @@ -21,31 +21,33 @@ export const variants: Variants<Component> = [
email: '[email protected]',
photoURL:
'https://broken-link.broken.jpg',
}
},
},
},
{
name: 'full name',
props: {
user: {
displayName: 'John Smith', email: '[email protected]',
}
displayName: 'John Smith',
email: '[email protected]',
},
},
},
{
name: 'single name',
props: {
user: {
displayName: 'John', email: '[email protected]',
}
displayName: 'John',
email: '[email protected]',
},
},
},
{
name: 'No display name, use email',
props: {
user: {
// email: '[email protected]',
}
},
},
},
]
8 changes: 4 additions & 4 deletions src/lib/ui/MultiSelect.variants.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type { Variant, Viewport } from 'kitbook'
import type { DeprecatedVariant, Viewport } from 'kitbook'
import type Component from './MultiSelect.svelte'

export const viewports: Viewport[] = [
{ width: 800, height: 600 },
]

export const variants: Variant<Component>[] = [
export const variants: DeprecatedVariant<Component>[] = [
{
props: {
options: [
{ value: 'en', name: 'English' },
{ value: 'en', name: 'English' },
{ value: 'es', name: 'Spanish' },
{ value: 'fr', name: 'French' },
],
selectedOptions: {
'en': { value: 'en', name: 'English' }
en: { value: 'en', name: 'English' },
},
},
},
Expand Down

0 comments on commit 86f4fe2

Please sign in to comment.