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:
brunnerh 2022-03-08 17:38:58 +01:00 committed by GitHub
commit 5de0d9a357
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 180 additions and 101 deletions

View file

@ -22,15 +22,10 @@ export interface BreakpointProps {
export default class Breakpoint extends SvelteComponentTyped<
BreakpointProps,
{
match: CustomEvent<{
change: CustomEvent<{
size: BreakpointSize;
breakpointValue: BreakpointValue;
}>;
},
{ default: { size: BreakpointSize; sizes: Record<BreakpointSize, boolean> } }
> {
/**
* Reference the Carbon grid breakpoints
*/
breakpoints: Record<BreakpointSize, BreakpointValue>;
}
> {}