mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
breaking(breakpoint): add breakpointObserver store (#1092)
* breaking: re-name event "on:match" to "on:change" in `Breakpoint.svelte` * feat: add `breakpointObserver` read-only store * refactor: export breakpoint constants from `breakpoints.js`
This commit is contained in:
parent
bbd2cbe62c
commit
5de0d9a357
14 changed files with 180 additions and 101 deletions
|
@ -5,13 +5,13 @@
|
|||
let events = [];
|
||||
</script>
|
||||
|
||||
<Breakpoint bind:size on:match="{(e) => (events = [...events, e.detail])}" />
|
||||
<Breakpoint bind:size on:change="{(e) => (events = [...events, e.detail])}" />
|
||||
|
||||
<p>Resize the width of your browser.</p>
|
||||
<h6>Breakpoint size</h6>
|
||||
<h1>{size}</h1>
|
||||
|
||||
<h6>on:match</h6>
|
||||
<h6>on:change</h6>
|
||||
<pre>
|
||||
{JSON.stringify(events, null, 2)}
|
||||
</pre>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue