Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow customizing Label component, add Em and Strong elemental …
…components
- Loading branch information
Showing
4 changed files
with
59 additions
and
8 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
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,18 @@ | ||
<em bind:this={element} use:useActions={use} use:forwardEvents {...$$restProps} | ||
><slot /></em | ||
> | ||
|
||
<script> | ||
import { get_current_component } from 'svelte/internal'; | ||
import { forwardEventsBuilder, useActions } from './internal.js'; | ||
export let use = []; | ||
const forwardEvents = forwardEventsBuilder(get_current_component()); | ||
let element = null; | ||
export function getElement() { | ||
return element; | ||
} | ||
</script> |
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,21 @@ | ||
<strong | ||
bind:this={element} | ||
use:useActions={use} | ||
use:forwardEvents | ||
{...$$restProps}><slot /></strong | ||
> | ||
|
||
<script> | ||
import { get_current_component } from 'svelte/internal'; | ||
import { forwardEventsBuilder, useActions } from './internal.js'; | ||
export let use = []; | ||
const forwardEvents = forwardEventsBuilder(get_current_component()); | ||
let element = null; | ||
export function getElement() { | ||
return element; | ||
} | ||
</script> |