File tree Expand file tree Collapse file tree 5 files changed +41
-0
lines changed
src/designSystem/kubitWireframe/commons/components Expand file tree Collapse file tree 5 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ export * from './styles' ;
2
+ export * from './variants' ;
Original file line number Diff line number Diff line change
1
+ import { LoaderStylesType } from '@/components/loader/types' ;
2
+
3
+ import { buildPrimaryLoader } from '../../assets/animations' ;
4
+ import { SIZES } from '../../foundations' ;
5
+ import { LoaderVariantType } from './variants' ;
6
+
7
+ const container = {
8
+ display : 'inline-block' ,
9
+ width : SIZES . size_200 ,
10
+ height : SIZES . size_200 ,
11
+ } ;
12
+ const transparent = 'transparent' ;
13
+
14
+ export const getLoaderStyles = ( COLORS : {
15
+ [ key : string ] : { [ key : string ] : string } ;
16
+ } ) : LoaderStylesType < LoaderVariantType > => {
17
+ return {
18
+ [ LoaderVariantType . PRIMARY_WHITE ] : {
19
+ container,
20
+ animation : buildPrimaryLoader ( COLORS . NEUTRAL . color_neutral_icon_250 , transparent ) ,
21
+ } ,
22
+ [ LoaderVariantType . PRIMARY_RED ] : {
23
+ container,
24
+ animation : buildPrimaryLoader ( COLORS . SECONDARY . color_secondary_icon_100 , transparent ) ,
25
+ } ,
26
+ [ LoaderVariantType . PRIMARY_BLACK ] : {
27
+ container,
28
+ animation : buildPrimaryLoader ( COLORS . NEUTRAL . color_neutral_icon_50 , transparent ) ,
29
+ } ,
30
+ } ;
31
+ } ;
Original file line number Diff line number Diff line change
1
+ export enum LoaderVariantType {
2
+ PRIMARY_WHITE = 'PRIMARY_WHITE' ,
3
+ PRIMARY_RED = 'PRIMARY_RED' ,
4
+ PRIMARY_BLACK = 'PRIMARY_BLACK' ,
5
+ }
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import { LAYOUT_STYLES } from './layout';
31
31
import { getLineSeparatorStyles } from './lineSeparator' ;
32
32
import { getLinkStyles } from './link' ;
33
33
import { getListOptionsStyles } from './listOptions' ;
34
+ import { getLoaderStyles } from './loader' ;
34
35
import { getMessageStyles } from './message' ;
35
36
import { getModalStyles } from './modal' ;
36
37
import { getNavigationCardStyles } from './navigationCard' ;
@@ -114,4 +115,5 @@ export const getComponentsStyles = (COLORS: {
114
115
TOGGLE_STYLES : getToggleStyles ( COLORS ) ,
115
116
TOOLTIP_STYLES : getTooltipStyles ( COLORS ) ,
116
117
VALIDATION_STATUS_STYLES : getValidationStatusStyles ( COLORS ) ,
118
+ LOADER_STYLES : getLoaderStyles ( COLORS ) ,
117
119
} ) ;
Original file line number Diff line number Diff line change @@ -54,3 +54,4 @@ export * from './thirdPartyAnimation/variants';
54
54
export * from './toggle/variants' ;
55
55
export * from './tooltip/variants' ;
56
56
export * from './validationStatus/variants' ;
57
+ export * from './loader/variants' ;
You can’t perform that action at this time.
0 commit comments