-
Notifications
You must be signed in to change notification settings - Fork 217
Expand file tree
/
Copy pathbutton.js
More file actions
81 lines (81 loc) · 2.47 KB
/
button.js
File metadata and controls
81 lines (81 loc) · 2.47 KB
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
/*
* Copyright (c) 2021, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
export default {
baseStyle: {
borderRadius: 'base'
},
variants: {
solid: (props) =>
props.colorScheme === 'blue'
? {
backgroundColor: 'blue.600',
color: 'white',
_hover: {bg: 'blue.700', _disabled: {bg: 'blue.300'}},
_active: {bg: 'blue.800'},
_disabled: {bg: 'blue.300'}
}
: {},
outline: (props) =>
props.colorScheme === 'black'
? {color: 'gray.900', _hover: {bg: 'gray.50'}, borderColor: 'gray.200'}
: {},
footer: {
fontSize: 'sm',
backgroundColor: 'gray.100',
color: 'black',
_hover: {bg: 'gray.200'},
_active: {bg: 'gray.300'},
paddingLeft: 3,
paddingRight: 3
},
link: (props) => ({
color: props.colorScheme === 'red' ? 'red.500' : 'blue.600',
fontWeight: 'normal',
minWidth: '1em',
lineHeight: 4
}),
'menu-link': {
color: 'black',
justifyContent: 'flex-start',
fontSize: 'sm',
_hover: {bg: 'gray.50', textDecoration: 'underline', textDecorationColor: 'gray.900'},
_activeLink: {
bg: 'gray.50',
borderLeft: 'solid',
borderLeftColor: 'gray.600',
borderLeftWidth: '4px'
}
},
'menu-link-mobile': {
color: 'black',
justifyContent: 'flex-start',
fontSize: 'sm',
_hover: {bg: 'gray.50', textDecoration: 'underline', textDecorationColor: 'gray.900'},
_activeLink: {
bg: 'gray.100',
border: 'solid',
borderColor: 'gray.600',
borderWidth: '1px'
}
},
'search-link': {
color: 'black',
justifyContent: 'flex-start',
fontSize: 'sm',
_hover: {textDecoration: 'none'}
}
},
sizes: {
md: {
height: 11,
minWidth: 11
}
},
defaultProps: {
colorScheme: 'blue'
}
}