-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kit):
Progress
add options with DI (#8065)
- Loading branch information
Showing
6 changed files
with
49 additions
and
7 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type {Provider} from '@angular/core'; | ||
import {tuiCreateToken, tuiProvideOptions} from '@taiga-ui/cdk'; | ||
import type {TuiSizeXXL, TuiSizeXXS} from '@taiga-ui/core'; | ||
|
||
export interface TuiProgressOptions { | ||
readonly color: string | null; | ||
readonly size: TuiSizeXXL | TuiSizeXXS; | ||
} | ||
|
||
export const TUI_PROGRESS_DEFAULT_OPTIONS: TuiProgressOptions = { | ||
color: null, | ||
size: 'm', | ||
}; | ||
|
||
export const TUI_PROGRESS_OPTIONS = tuiCreateToken(TUI_PROGRESS_DEFAULT_OPTIONS); | ||
|
||
export function tuiProgressOptionsProvider( | ||
options: Partial<TuiProgressOptions>, | ||
): Provider { | ||
return tuiProvideOptions(TUI_PROGRESS_OPTIONS, options, TUI_PROGRESS_DEFAULT_OPTIONS); | ||
} |