/
index.js
89 lines (81 loc) · 2.37 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import core from '@pluralsight/ps-design-system-core'
import {
defaultName as themeDefaultName,
names as themeNames
} from '@pluralsight/ps-design-system-theme/vars'
import * as vars from '../vars'
export const sizeClasses = {
[vars.sizes.small]: '.psds-emptystate--size-small',
[vars.sizes.large]: '.psds-emptystate--size-large'
}
export const themeClasses = {
[themeDefaultName]: `.psds-theme--dark`,
[themeNames.light]: `.psds-theme--light`
}
export default {
'.psds-emptystate': {
margin: '0 auto',
padding: `${core.layout.spacingXLarge} ${core.layout.spacingLarge}`,
textAlign: 'center',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
transition: `opacity ${core.motion.speedXFast} ${core.motion.speedNormal}`
},
'.psds-emptystate--hidden': {
opacity: 0
},
['.psds-emptystate' + themeClasses[themeDefaultName]]: {
color: core.colors.white
},
['.psds-emptystate' + themeClasses[themeNames.light]]: {
color: core.colors.gray06
},
// __actions
'.psds-emptystate__actions': {
maxWidth: 500
},
// __caption
'.psds-emptystate__caption': {
marginBottom: core.layout.spacingLarge,
fontSize: core.type.psTypeFontSizeSmall,
letterSpacing: core.type.psTypeLetterSpacingSmall,
lineHeight: core.type.psTypeLineHeightStandard,
maxWidth: 500
},
['.psds-emptystate__caption' + themeClasses[themeDefaultName]]: {
color: core.colors.gray01
},
['.psds-emptystate__caption' + themeClasses[themeNames.light]]: {
color: core.colors.gray04
},
// __heading,
'.psds-emptystate__heading': {
marginBottom: core.layout.spacingLarge,
letterSpacing: core.type.letterSpacingLarge,
fontWeight: core.type.fontWeightBook,
maxWidth: 500
},
['.psds-emptystate__heading' + sizeClasses.small]: {
fontSize: core.type.fontSizeMedium
},
['.psds-emptystate__heading' + sizeClasses.large]: {
fontSize: core.type.fontSizeLarge,
lineHeight: core.type.lineHeightExtra
},
// __illustration
'.psds-emptystate__illustration': {
display: 'inline-block',
marginBottom: core.layout.spacingLarge,
transition: `all ${core.motion.speedXFast}`
},
['.psds-emptystate__illustration' + sizeClasses.small]: {
width: 64,
height: 64
},
['.psds-emptystate__illustration' + sizeClasses.large]: {
width: 128,
height: 128
}
}