forked from sveltejs/svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from sveltejs/master
Sync Fork from Upstream Repo
- Loading branch information
Showing
19 changed files
with
89 additions
and
64 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
4 changes: 2 additions & 2 deletions
4
site/content/examples/04-events/05-dom-event-forwarding/App.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<script> | ||
import FancyButton from './FancyButton.svelte'; | ||
import CustomButton from './CustomButton.svelte'; | ||
function handleClick() { | ||
alert('clicked'); | ||
} | ||
</script> | ||
|
||
<FancyButton on:click={handleClick}/> | ||
<CustomButton on:click={handleClick}/> |
22 changes: 22 additions & 0 deletions
22
site/content/examples/04-events/05-dom-event-forwarding/CustomButton.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,22 @@ | ||
<style> | ||
button { | ||
height: 4rem; | ||
width: 8rem; | ||
background-color: #aaa; | ||
border-color: #f1c40f; | ||
color: #f1c40f; | ||
font-size: 1.25rem; | ||
background-image: linear-gradient(45deg, #f1c40f 50%, transparent 50%); | ||
background-position: 100%; | ||
background-size: 400%; | ||
transition: background 300ms ease-in-out; | ||
} | ||
button:hover { | ||
background-position: 0; | ||
color: #aaa; | ||
} | ||
</style> | ||
|
||
<button on:click> | ||
Click me | ||
</button> |
15 changes: 0 additions & 15 deletions
15
site/content/examples/04-events/05-dom-event-forwarding/FancyButton.svelte
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
site/content/tutorial/05-events/06-dom-event-forwarding/app-a/App.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<script> | ||
import FancyButton from './FancyButton.svelte'; | ||
import CustomButton from './CustomButton.svelte'; | ||
function handleClick() { | ||
alert('clicked'); | ||
} | ||
</script> | ||
|
||
<FancyButton on:click={handleClick}/> | ||
<CustomButton on:click={handleClick}/> |
22 changes: 22 additions & 0 deletions
22
site/content/tutorial/05-events/06-dom-event-forwarding/app-a/CustomButton.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,22 @@ | ||
<style> | ||
button { | ||
height: 4rem; | ||
width: 8rem; | ||
background-color: #aaa; | ||
border-color: #f1c40f; | ||
color: #f1c40f; | ||
font-size: 1.25rem; | ||
background-image: linear-gradient(45deg, #f1c40f 50%, transparent 50%); | ||
background-position: 100%; | ||
background-size: 400%; | ||
transition: background 300ms ease-in-out; | ||
} | ||
button:hover { | ||
background-position: 0; | ||
color: #aaa; | ||
} | ||
</style> | ||
|
||
<button> | ||
Click me | ||
</button> |
15 changes: 0 additions & 15 deletions
15
site/content/tutorial/05-events/06-dom-event-forwarding/app-a/FancyButton.svelte
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
site/content/tutorial/05-events/06-dom-event-forwarding/app-b/App.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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<script> | ||
import FancyButton from './FancyButton.svelte'; | ||
import CustomButton from './CustomButton.svelte'; | ||
function handleClick() { | ||
alert('clicked'); | ||
} | ||
</script> | ||
|
||
<FancyButton on:click={handleClick}/> | ||
<CustomButton on:click={handleClick}/> |
22 changes: 22 additions & 0 deletions
22
site/content/tutorial/05-events/06-dom-event-forwarding/app-b/CustomButton.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,22 @@ | ||
<style> | ||
button { | ||
height: 4rem; | ||
width: 8rem; | ||
background-color: #aaa; | ||
border-color: #f1c40f; | ||
color: #f1c40f; | ||
font-size: 1.25rem; | ||
background-image: linear-gradient(45deg, #f1c40f 50%, transparent 50%); | ||
background-position: 100%; | ||
background-size: 400%; | ||
transition: background 300ms ease-in-out; | ||
} | ||
button:hover { | ||
background-position: 0; | ||
color: #aaa; | ||
} | ||
</style> | ||
|
||
<button on:click> | ||
Click me | ||
</button> |
15 changes: 0 additions & 15 deletions
15
site/content/tutorial/05-events/06-dom-event-forwarding/app-b/FancyButton.svelte
This file was deleted.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
2 changes: 2 additions & 0 deletions
2
test/custom-elements/samples/extended-builtin/custom-button.js
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,2 @@ | ||
class CustomButton extends HTMLButtonElement {} | ||
customElements.define('custom-button', CustomButton, { extends: 'button' }); |
2 changes: 0 additions & 2 deletions
2
test/custom-elements/samples/extended-builtin/fancy-button.js
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<svelte:options tag="custom-element"/> | ||
|
||
<script> | ||
import './fancy-button.js'; | ||
import './custom-button.js'; | ||
</script> | ||
|
||
<button is="fancy-button">click me</button> | ||
<button is="custom-button">click me</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
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