Refactored useStates
This commit is contained in:
1 parent
3b88ea01d0
commit
081eb1727a
7 files changed
+168
-165
No files matched your search
@@ -33,5 +33,4 @@
|
||||
font-size: var(--env-var-font-size-medium);
|
||||
color: var(--env-var-color-5);
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -10,9 +10,9 @@ const CustomizableCheckbox = (props) => {
|
||||
onChange={props.handleChange}
|
||||
className="custom-checkbox"
|
||||
type="checkbox"
|
||||
id="checkbox"
|
||||
id={props.id}
|
||||
/>
|
||||
<label className="custom-checkbox-label">{props.title}</label>
|
||||
<label className="custom-checkbox-label" htmlFor={props.id}>{props.title}</label>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -3,10 +3,10 @@ import React from "react";
|
||||
|
||||
const ConfigBox = ({ leftLayout, rightLayout }) => {
|
||||
return (
|
||||
<div className="config-box">
|
||||
<form className="config-box" noValidate spellCheck="false">
|
||||
{leftLayout}
|
||||
{rightLayout}
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
* />
|
||||
*
|
||||
* @param {Object} props - The component props.
|
||||
* @param {string} props.id - The id of the radio button.
|
||||
* @param {string} props.title - The title of the radio button.
|
||||
* @param {string} [props.desc] - The description of the radio button.
|
||||
* @param {string} [props.size="small"] - The size of the radio button.
|
||||
@@ -28,7 +29,7 @@ function RadioButton(props) {
|
||||
<FormControlLabel
|
||||
checked={props.checked}
|
||||
value={props.value}
|
||||
control={<Radio size={props.size} />}
|
||||
control={<Radio id={props.id} size={props.size} />}
|
||||
onChange={props.onChange}
|
||||
label={
|
||||
<div>
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
import "./flexibileTextField.css";
|
||||
import React from "react";
|
||||
|
||||
const FlexibileTextField = ({ title, type, placeholder, value, onChange }) => {
|
||||
const FlexibileTextField = ({
|
||||
id,
|
||||
title,
|
||||
type,
|
||||
placeholder,
|
||||
value,
|
||||
onChange,
|
||||
}) => {
|
||||
return (
|
||||
<div className="flexibile-textfield">
|
||||
<div className="flexibile-textfield-title">{title}</div>
|
||||
<input
|
||||
id={id}
|
||||
type={type}
|
||||
className="flexibile-textfield-input"
|
||||
placeholder={placeholder}
|
||||
|
||||
Reference in new issue
Block a user