forked from ksc-fe/kpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.ts
44 lines (39 loc) · 1.04 KB
/
styles.ts
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
import {theme, setDefault} from '../../styles/theme';
import {css} from '@emotion/css';
import '../../styles/global';
import {deepDefaults} from '../../styles/utils';
const defaults = {
title: {
fontSize: '14px',
gap: '8px'
},
get color() { return theme.color.text },
get padding() { return `6px ${theme.default.padding}` },
};
let tip: any;
setDefault(() => {
tip = deepDefaults(theme, {tip: defaults}).tip;
});
export function makeStyles() {
return css`
// Tip extends Tag, so we add k-tip to increase the priority of class
&.k-tip {
display: flex;
height: auto;
padding: 0;
color: ${tip.color} !important;
align-items: flex-start;
}
.k-tip-wrapper {
flex: 1;
padding: ${tip.padding};
}
.k-tip-title {
font-size: ${tip.title.fontSize};
margin-bottom: ${tip.title.gap};
}
&.k-fade-leave-active {
position: relative;
}
`;
}