-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(cc-tile-status-codes)!: migrate to the new smart component d…
…esign BREAKING CHANGE: the properties have changed - `state`: new property containing the whole state - `statusCodes`: property has been deleted as it is now part of the state - `error`: property has been deleted as it is now part of the state Fixes #924
- Loading branch information
1 parent
aff6229
commit fc5dc71
Showing
6 changed files
with
66 additions
and
61 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
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
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
17 changes: 15 additions & 2 deletions
17
src/components/cc-tile-status-codes/cc-tile-status-codes.types.d.ts
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,20 @@ | ||
export type TileStatusCodesState = TileStatusCodesStateLoading | TileStatusCodesStateLoaded | TileStatusCodesStateError; | ||
|
||
interface TileStatusCodesStateLoading { | ||
type: 'loading'; | ||
} | ||
|
||
interface TileStatusCodesStateLoaded { | ||
type: 'loaded'; | ||
statusCodes: StatusCodesData; | ||
} | ||
|
||
interface TileStatusCodesStateError { | ||
type: 'error'; | ||
} | ||
|
||
interface StatusCodesData { | ||
// Status code number as property. | ||
// Number of requests as value. | ||
[index: number]: number; | ||
} | ||
|
||
|
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