diff options
author | Sebastian <sebasjm@gmail.com> | 2023-04-21 10:47:47 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-04-21 10:47:47 -0300 |
commit | f470f167e32d8f7775ad994f09afb1d353b0b300 (patch) | |
tree | 3a1f2a040bb09d6639c81436b90b416fb8044f91 /packages/anastasis-webui/src/components/picker/DurationPicker.stories.tsx | |
parent | 6dcc488a2c8fd681941e5d3b62bb04af7669888e (diff) | |
download | wallet-core-f470f167e32d8f7775ad994f09afb1d353b0b300.tar.xz |
integrate anastasis to the web-utils testing api
Diffstat (limited to 'packages/anastasis-webui/src/components/picker/DurationPicker.stories.tsx')
-rw-r--r-- | packages/anastasis-webui/src/components/picker/DurationPicker.stories.tsx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/packages/anastasis-webui/src/components/picker/DurationPicker.stories.tsx b/packages/anastasis-webui/src/components/picker/DurationPicker.stories.tsx index 0339c9ec0..b4844c706 100644 --- a/packages/anastasis-webui/src/components/picker/DurationPicker.stories.tsx +++ b/packages/anastasis-webui/src/components/picker/DurationPicker.stories.tsx @@ -22,6 +22,7 @@ import { h, FunctionalComponent } from "preact"; import { useState } from "preact/hooks"; import { DurationPicker as TestedComponent } from "./DurationPicker.js"; +import { tests } from "@gnu-taler/web-util/lib/index.browser"; export default { component: TestedComponent, @@ -31,16 +32,7 @@ export default { }, }; -function createExample<Props>( - Component: FunctionalComponent<Props>, - props: Partial<Props>, -) { - const r = (args: any) => <Component {...args} />; - r.args = props; - return r; -} - -export const Example = createExample(TestedComponent, { +export const Example = tests.createExample(TestedComponent, { days: true, minutes: true, hours: true, |