Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactors Svelte Buttons to no longer use label, isIconLeft, isIconRi…
…ght and just renders the entire slot and lets the consumer decide what they want there
- Loading branch information
1 parent
12edfa1
commit c18eb72
Showing
9 changed files
with
190 additions
and
188 deletions.
There are no files selected for viewing
216 changes: 91 additions & 125 deletions
216
agnosticui-svelte/src/__snapshots__/Storyshots.test.js.snap
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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,38 @@ | ||
<script> | ||
// https://github.com/storybookjs/storybook/issues/8443 | ||
import Button from "./Button.svelte"; | ||
// Unfortunately, these have to be duplicated from Button :( | ||
export let mode = ""; | ||
export let size = ""; | ||
export let isBordered = false; | ||
export let isBlock = false; | ||
export let isBlank = false; | ||
export let isDisabled = false; | ||
export let isRaised = false; | ||
export let isRounded = false; | ||
export let isSkinned = true; | ||
export let css = ""; | ||
export let type = "button"; | ||
</script> | ||
|
||
<style> | ||
span { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
|
||
<Button | ||
{mode} | ||
{size} | ||
{isBordered} | ||
{isBlock} | ||
{isBlank} | ||
{isDisabled} | ||
{isRaised} | ||
{isRounded} | ||
{isSkinned} | ||
{css} | ||
{type}> | ||
<span>Go</span> | ||
</Button> |
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,7 @@ | ||
<script> | ||
export let Component; | ||
</script> | ||
|
||
<svelte:component this={Component}> | ||
<h1 data-testid="slot">Go</h1> | ||
</svelte:component> |