@bitrise/bitkit 10.18.1 → 10.18.2
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/package.json
CHANGED
|
@@ -4,7 +4,6 @@ const ToggleTheme: ComponentStyleConfig = {
|
|
|
4
4
|
baseStyle: {
|
|
5
5
|
formControl: {
|
|
6
6
|
display: 'flex',
|
|
7
|
-
flexWrap: 'wrap',
|
|
8
7
|
gap: '8',
|
|
9
8
|
},
|
|
10
9
|
track: {
|
|
@@ -61,18 +60,17 @@ const ToggleTheme: ComponentStyleConfig = {
|
|
|
61
60
|
transform: 'translate(24px)',
|
|
62
61
|
},
|
|
63
62
|
},
|
|
64
|
-
label: {
|
|
65
|
-
flexBasis: 'calc(100% - 56px)',
|
|
66
|
-
},
|
|
67
63
|
spinner: {
|
|
68
64
|
width: '16',
|
|
69
65
|
height: '16',
|
|
66
|
+
marginTop: '4',
|
|
67
|
+
flexShrink: 0,
|
|
70
68
|
color: 'neutral.70',
|
|
71
69
|
},
|
|
72
70
|
helpherText: {
|
|
73
71
|
fontSize: '2',
|
|
74
72
|
lineHeight: '2',
|
|
75
|
-
marginTop: '
|
|
73
|
+
marginTop: '8px',
|
|
76
74
|
color: 'neutral.40',
|
|
77
75
|
},
|
|
78
76
|
},
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
forwardRef,
|
|
10
10
|
useMultiStyleConfig,
|
|
11
11
|
} from '@chakra-ui/react';
|
|
12
|
+
import Box from '../Box/Box';
|
|
12
13
|
import Text from '../Text/Text';
|
|
13
14
|
|
|
14
15
|
export interface ToggleProps extends Omit<FormControlProps, 'label'> {
|
|
@@ -52,12 +53,12 @@ const Toggle = forwardRef<ToggleProps, 'div'>((props, ref) => {
|
|
|
52
53
|
};
|
|
53
54
|
const css = useMultiStyleConfig('Switch');
|
|
54
55
|
return (
|
|
55
|
-
<FormControl
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
{label}
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
<FormControl {...rest} ref={ref}>
|
|
57
|
+
<Box sx={css.formControl}>
|
|
58
|
+
<Switch {...switchProps} />
|
|
59
|
+
<FormLabel htmlFor={id}>{label}</FormLabel>
|
|
60
|
+
{isLoading && <Spinner sx={css.spinner} />}
|
|
61
|
+
</Box>
|
|
61
62
|
{helpherText && <Text sx={css.helpherText}>{helpherText}</Text>}
|
|
62
63
|
</FormControl>
|
|
63
64
|
);
|