@bitrise/bitkit 10.18.0 → 10.18.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "10.18.0",
4
+ "version": "10.18.1",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -12,6 +12,7 @@ import {
12
12
  import Text from '../Text/Text';
13
13
 
14
14
  export interface ToggleProps extends Omit<FormControlProps, 'label'> {
15
+ dataTestid?: string;
15
16
  defaultChecked?: SwitchProps['defaultChecked'];
16
17
  id?: SwitchProps['id'];
17
18
  isChecked?: SwitchProps['isChecked'];
@@ -27,8 +28,21 @@ export interface ToggleProps extends Omit<FormControlProps, 'label'> {
27
28
  * The Toggle component is used as an alternative for the checkbox component.
28
29
  */
29
30
  const Toggle = forwardRef<ToggleProps, 'div'>((props, ref) => {
30
- const { defaultChecked, helpherText, id, isChecked, isDisabled, isLoading, label, onChange, value, ...rest } = props;
31
+ const {
32
+ dataTestid,
33
+ defaultChecked,
34
+ helpherText,
35
+ id,
36
+ isChecked,
37
+ isDisabled,
38
+ isLoading,
39
+ label,
40
+ onChange,
41
+ value,
42
+ ...rest
43
+ } = props;
31
44
  const switchProps = {
45
+ dataTestid,
32
46
  defaultChecked,
33
47
  id,
34
48
  isChecked,