fc -> plain
This commit is contained in:
1 parent
660346d2bc
commit
666d522ee9
21 files changed
+45
-58
No files matched your search
@@ -21,12 +21,12 @@ type AutoCompleteInputProps = Omit<
|
||||
required?: boolean;
|
||||
};
|
||||
|
||||
export const AutoCompleteInput: React.FC<AutoCompleteInputProps> = ({
|
||||
export const AutoCompleteInput = ({
|
||||
fieldLabel,
|
||||
required,
|
||||
renderInput,
|
||||
...props
|
||||
}) => {
|
||||
}: AutoCompleteInputProps) => {
|
||||
const theme = useTheme();
|
||||
const multiple = props.multiple;
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@ import MenuItem from "@mui/material/MenuItem";
|
||||
import type { ButtonGroupProps } from "@mui/material/ButtonGroup";
|
||||
import { ChevronDown } from "lucide-react";
|
||||
|
||||
export const ButtonGroupInput: React.FC<ButtonGroupProps> = ({
|
||||
export const ButtonGroupInput = ({
|
||||
orientation,
|
||||
children,
|
||||
sx,
|
||||
...props
|
||||
}) => {
|
||||
}: ButtonGroupProps) => {
|
||||
const isVertical = orientation === "vertical";
|
||||
|
||||
if (!isVertical) {
|
||||
|
||||
@@ -7,11 +7,11 @@ interface FieldLabelProps {
|
||||
htmlFor?: string;
|
||||
}
|
||||
|
||||
export const FieldLabel: React.FC<FieldLabelProps> = ({
|
||||
export const FieldLabel = ({
|
||||
children,
|
||||
required = false,
|
||||
htmlFor,
|
||||
}) => {
|
||||
}: FieldLabelProps) => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import MuiFormControlLabel from "@mui/material/FormControlLabel";
|
||||
import type { FormControlLabelProps } from "@mui/material/FormControlLabel";
|
||||
|
||||
export const FormControlLabel: React.FC<FormControlLabelProps> = ({
|
||||
...props
|
||||
}) => {
|
||||
export const FormControlLabel = ({ ...props }: FormControlLabelProps) => {
|
||||
return (
|
||||
<MuiFormControlLabel
|
||||
{...props}
|
||||
|
||||
@@ -9,12 +9,12 @@ interface FormFieldProps {
|
||||
htmlFor?: string;
|
||||
}
|
||||
|
||||
export const FormField: React.FC<FormFieldProps> = ({
|
||||
export const FormField = ({
|
||||
label,
|
||||
required = false,
|
||||
children,
|
||||
htmlFor,
|
||||
}) => {
|
||||
}: FormFieldProps) => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
|
||||
@@ -7,7 +7,7 @@ import Typography from "@mui/material/Typography";
|
||||
|
||||
interface RadioInputProps extends RadioProps {}
|
||||
|
||||
export const RadioInput: React.FC<RadioInputProps> = ({ ...props }) => {
|
||||
export const RadioInput = ({ ...props }: RadioInputProps) => {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<Radio
|
||||
@@ -39,9 +39,11 @@ export const RadioInput: React.FC<RadioInputProps> = ({ ...props }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const RadioWithDescription: React.FC<
|
||||
RadioInputProps & { label: string; description: string }
|
||||
> = ({ label, description, ...props }) => {
|
||||
export const RadioWithDescription = ({
|
||||
label,
|
||||
description,
|
||||
...props
|
||||
}: RadioInputProps & { label: string; description: string }) => {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<FormControlLabel
|
||||
|
||||
@@ -9,7 +9,6 @@ import { Tooltip } from "@/components/design-elements";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useAppSelector, useAppDispatch } from "@/hooks/AppHooks";
|
||||
import { setSelectedTeamId } from "@/features/authSlice";
|
||||
import { useNavigate } from "react-router";
|
||||
import { useGet } from "@/hooks/UseApi";
|
||||
import type { ApiResponse } from "@/hooks/UseApi";
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
@@ -17,7 +16,6 @@ import { useTranslation } from "react-i18next";
|
||||
|
||||
export const TeamSwitch = () => {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const dispatch = useAppDispatch();
|
||||
const theme = useTheme();
|
||||
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
||||
|
||||
Reference in new issue
Block a user