-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add decorators support, write more tests
- Loading branch information
Showing
16 changed files
with
593 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
code/renderers/svelte/src/__test__/composeStories/AddWrapperDecorator.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div style="margin: 3em;"> | ||
<slot/> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,5 @@ | |
on:click | ||
> | ||
{label} | ||
<slot/> | ||
</button> |
10 changes: 10 additions & 0 deletions
10
code/renderers/svelte/src/__test__/composeStories/CustomRenderComponent.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<script> | ||
import Button from './Button.svelte'; | ||
export let args; | ||
</script> | ||
|
||
<div> | ||
<p data-testid="custom-render">I am a custom render function</p> | ||
<Button {...args} /> | ||
</div> |
1 change: 1 addition & 0 deletions
1
code/renderers/svelte/src/__test__/composeStories/InputFilledStoryComponent.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<input data-testid="input" /> |
15 changes: 15 additions & 0 deletions
15
code/renderers/svelte/src/__test__/composeStories/LoaderStoryComponent.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script> | ||
export let mockFn; | ||
export let loaded; | ||
let data; | ||
$: if (mockFn && loaded) { | ||
data = mockFn('render'); | ||
} | ||
</script> | ||
|
||
<div> | ||
<div data-testid="loaded-data">{loaded.value}</div> | ||
<div data-testid="spy-data">{String(data)}</div> | ||
</div> |
11 changes: 11 additions & 0 deletions
11
code/renderers/svelte/src/__test__/composeStories/StoryWithLocaleComponent.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script> | ||
import Button from './Button.svelte'; | ||
export let locale; | ||
export let label; | ||
</script> | ||
|
||
<div> | ||
<p>locale: {locale}</p> | ||
<Button label={label} /> | ||
</div> |
Oops, something went wrong.