-
-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathButton.styles.js
More file actions
22 lines (21 loc) · 603 Bytes
/
Button.styles.js
File metadata and controls
22 lines (21 loc) · 603 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
export const getButtonStyles = ({
variant,
size,
active,
disabled,
theme,
}) => {
const variantStyles = theme.variants[variant];
const sizeStyles = theme.sizes[size];
return {
backgroundColor: variantStyles.background,
color: variantStyles.color,
padding: sizeStyles.padding,
fontSize: sizeStyles.fontSize,
border: 'none',
borderRadius: '0.375rem',
cursor: disabled ? 'not-allowed' : 'pointer',
opacity: disabled ? 0.6 : 1,
boxShadow: active ? 'inset 0 3px 5px rgba(0,0,0,.125)' : 'none',
};
};