mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-21 04:39:19 +00:00
Remove additional exports of breakpoint symbols.
Restore typedef entries in `Breakpoint` component. Generate type definitions for `constants.js` and `breakpointObserver.js`. Validate size passed to `smallerThan`/`largerThan`. Document `breakpointObserver`/`breakpoints`. Fix `Breakpoint` component docs/example.
This commit is contained in:
parent
3c1e868165
commit
213d4debe7
13 changed files with 97 additions and 14 deletions
19
src/Breakpoint/breakpointObserver.d.ts
vendored
Normal file
19
src/Breakpoint/breakpointObserver.d.ts
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* Creates a readable store that returns the current {@link BreakpointSize}.
|
||||
* It also provides functions for creating derived stores used to do comparisons.
|
||||
*/
|
||||
export function breakpointObserver(): {
|
||||
subscribe: (this: void, run: import("svelte/store").Subscriber<any>, invalidate?: (value?: any) => void) => import("svelte/store").Unsubscriber;
|
||||
/**
|
||||
* Returns a store readable store that returns whether the current
|
||||
* breakpoint is smaller than {@link size}.
|
||||
* @param {BreakpointSize} size Size to compare against.
|
||||
*/
|
||||
smallerThan: (size: BreakpointSize) => import("svelte/store").Readable<boolean>;
|
||||
/**
|
||||
* Returns a store readable store that returns whether the current
|
||||
* breakpoint is larger than {@link size}.
|
||||
* @param {BreakpointSize} size Size to compare against.
|
||||
*/
|
||||
largerThan: (size: BreakpointSize) => import("svelte/store").Readable<boolean>;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue