Skip to content

Commit

Permalink
fix: fix searchbox story
Browse files Browse the repository at this point in the history
  • Loading branch information
g-francesca committed Jul 16, 2024
1 parent ef8195b commit 2cc3650
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
3 changes: 0 additions & 3 deletions apps/storybook/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ const preview = {
},
backgrounds: {
default: 'light',
onchange: (value) => {
console.log('backgrounds', value)
},
values: [
{
name: 'dark',
Expand Down
16 changes: 9 additions & 7 deletions apps/storybook/stories/search-box.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@ const meta: Meta<Components.SearchBox> = {
}
export default meta

const Template = ({ colorScheme, ...args }, context) => {
// todo: I'd like to programatically update parameters background value of colorScheme changes and vice versa
// const Template = ({ colorScheme, ...args }, context) => {
// // todo: I'd like to programatically update parameters background value of colorScheme changes and vice versa
// console.log('colorScheme', colorScheme)
// console.log('args', args.themeConfig)

return html`
<search-box ${spread(args)} color-scheme=${colorScheme}></search-box>
`
}
// return html`
// <search-box ${spread(args)} color-scheme=${colorScheme}></search-box>
// `
// }

export const SearchBox: Story = {
render: Template,
// render: Template,
args: {
open: true,
facetProperty: 'category',
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-stencil-vue/lib/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const OramaChatUserMessage = /*@__PURE__*/ defineContainer<JSX.OramaChatU

export const OramaFacets = /*@__PURE__*/ defineContainer<JSX.OramaFacets>('orama-facets', undefined, [
'facets',
'onFacetClick',
'selectedFacet'
'selectedFacet',
'onFacetClick'
]);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export type Facet = { name: string; count: number }
*/
export class OramaFacets {
@Prop() facets: Facet[]
@Prop() onFacetClick: (facetName: string) => void
@Prop() selectedFacet: string
@Prop() onFacetClick: (facetName: string) => void

handleClick(facet: Facet) {
this.onFacetClick(facet.name)
Expand Down

0 comments on commit 2cc3650

Please sign in to comment.