mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +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
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts">
|
||||
import { Breakpoint } from "../types";
|
||||
import type { BreakpointSize } from "../types/Breakpoint/Breakpoint.svelte";
|
||||
import type { BreakpointProps } from "../types/Breakpoint/Breakpoint.svelte";
|
||||
|
||||
let size: BreakpointSize;
|
||||
let size: BreakpointProps["size"];
|
||||
</script>
|
||||
|
||||
<Breakpoint
|
||||
bind:size
|
||||
let:size="{currentSize}"
|
||||
on:match="{(e) => {
|
||||
on:change="{(e) => {
|
||||
console.log(e.detail);
|
||||
}}"
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue