@apify/ui-library 1.97.0 → 1.97.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/button.d.ts +0 -1
- package/dist/src/components/button.d.ts.map +1 -1
- package/dist/src/components/button.js +3 -5
- package/dist/src/components/button.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/button.tsx +2 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apify/ui-library",
|
|
3
|
-
"version": "1.97.
|
|
3
|
+
"version": "1.97.1",
|
|
4
4
|
"description": "React UI library used by apify.com",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"src",
|
|
65
65
|
"style"
|
|
66
66
|
],
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "5174c9c9414a8c7f6107dab1d339ee2246b434a5"
|
|
68
68
|
}
|
|
@@ -67,7 +67,6 @@ type ButtonColorCombinations = {
|
|
|
67
67
|
|
|
68
68
|
type ButtonSizeCombinations = {
|
|
69
69
|
[Size in ButtonSize]: {
|
|
70
|
-
fontSize: number,
|
|
71
70
|
horizontalPadding: number,
|
|
72
71
|
height: number,
|
|
73
72
|
};
|
|
@@ -152,12 +151,10 @@ const BUTTON_COLOR_VARIANTS_CSS: ButtonColorCombinations = {
|
|
|
152
151
|
|
|
153
152
|
export const BUTTON_SIZE_VARIANTS_CSS: ButtonSizeCombinations = {
|
|
154
153
|
medium: {
|
|
155
|
-
fontSize: 14,
|
|
156
154
|
height: 32,
|
|
157
155
|
horizontalPadding: 12,
|
|
158
156
|
},
|
|
159
157
|
small: {
|
|
160
|
-
fontSize: 14,
|
|
161
158
|
height: 28,
|
|
162
159
|
horizontalPadding: 8,
|
|
163
160
|
},
|
|
@@ -204,20 +201,20 @@ export const getButtonColorStyles = (variant: ButtonVariant = 'primary', color:
|
|
|
204
201
|
|
|
205
202
|
export const getButtonSizeStyles = (size: ButtonSize = 'medium') => {
|
|
206
203
|
const {
|
|
207
|
-
fontSize,
|
|
208
204
|
height,
|
|
209
205
|
horizontalPadding,
|
|
210
206
|
} = BUTTON_SIZE_VARIANTS_CSS[size];
|
|
211
207
|
|
|
212
208
|
return css`
|
|
213
209
|
height: ${height}px;
|
|
214
|
-
font-size: ${fontSize}px;
|
|
215
210
|
/* We just want to ensure padding on the sides. Height is set the the hard way for simplicity */
|
|
216
211
|
padding: 0 ${horizontalPadding}px;
|
|
217
212
|
`;
|
|
218
213
|
};
|
|
219
214
|
|
|
220
215
|
const StyledButton = styled(Box)<WithTransientProps<Required<TransientButtonProps>>>`
|
|
216
|
+
${theme.typography.shared.mobile.bodyMMedium};
|
|
217
|
+
|
|
221
218
|
/* Basic positioning */
|
|
222
219
|
display: inline-flex;
|
|
223
220
|
align-items: center;
|
|
@@ -227,7 +224,6 @@ const StyledButton = styled(Box)<WithTransientProps<Required<TransientButtonProp
|
|
|
227
224
|
gap: ${theme.space.space8};
|
|
228
225
|
|
|
229
226
|
/* Basic styles */
|
|
230
|
-
font-weight: 500;
|
|
231
227
|
white-space: nowrap;
|
|
232
228
|
cursor: pointer;
|
|
233
229
|
transition: border-color ${theme.transition.fastEaseOut}, background-color ${theme.transition.fastEaseOut};
|