@madie/madie-design-system 1.2.94 → 1.2.95

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.
@@ -1,5 +1,6 @@
1
1
  import React, { useState } from "react";
2
2
  import PropTypes from "prop-types";
3
+ import { FormControlLabel, Switch } from "@mui/material";
3
4
 
4
5
  const Toggle = ({
5
6
  checked,
@@ -34,22 +35,25 @@ const Toggle = ({
34
35
  };
35
36
 
36
37
  return (
37
- <div className={classes}>
38
- <label className="qpp-c-toggle__label">
39
- <input
38
+ <FormControlLabel
39
+ className={classes}
40
+ control={
41
+ <Switch
40
42
  checked={isChecked}
41
- className="qpp-c-toggle__input"
42
43
  disabled={disabled}
43
44
  id={id}
44
45
  onChange={handleChange}
45
- role="switch"
46
- type="checkbox"
47
- {...rest}
46
+ slotProps={{
47
+ input: {
48
+ role: "switch",
49
+ ...rest,
50
+ },
51
+ }}
48
52
  />
49
- <span className="qpp-c-toggle__control" aria-hidden="true" />
50
- {label && <span className="qpp-c-toggle__text">{label}</span>}
51
- </label>
52
- </div>
53
+ }
54
+ label={label}
55
+ sx={{ color: "#515151", textTransform: "none" }}
56
+ />
53
57
  );
54
58
  };
55
59