copied new version
This commit is contained in:
20
onix-gui/GUI/components/Slider/Slider.jsx
Normal file
20
onix-gui/GUI/components/Slider/Slider.jsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import React from "react";
|
||||
import styles from "./Slider.module.css";
|
||||
|
||||
const Slider = ({ label, checked, toggleChecked }) => {
|
||||
return (
|
||||
<div className={styles.inputContainer}>
|
||||
<label className={styles.inputLabel}>{label}</label>
|
||||
<label className={styles.switch}>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={checked}
|
||||
onChange={() => toggleChecked(!checked)}
|
||||
/>
|
||||
<span className={`${styles.slider} ${styles.round}`}></span>
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Slider;
|
||||
Reference in New Issue
Block a user