Skip to content

Commit

Permalink
asset: Add JSDoc description to ValidatedTextField
Browse files Browse the repository at this point in the history
  • Loading branch information
trillium committed Aug 28, 2023
1 parent 338c683 commit aa6d7e8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions client/src/components/parts/form/ValidatedTextField.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
import React from 'react';
import { Box, Grid, InputLabel, TextField } from "@mui/material";

/**
* A validated text field component for forms.
*
* @component
* @param {Object} props - The component props.
* @param {Function} props.register - Function used for registering the input field with react-hook-form.
* @param {Object} props.errors - Object containing form validation errors.
* @param {boolean} props.isEdit - Boolean indicating if the form is in edit mode.
* @param {boolean} props.editMode - Boolean indicating if the component is in edit mode.
* @param {string} props.locationType - The type of location.
* @param {ReactNode} props.locationRadios - Radio Buttons for selecting location type.
* @param {Object} props.input - The input configuration for the text field.
* @returns {ReactElement} The rendered component.
*/
function ValidatedTextField({
register,
errors,
Expand Down

0 comments on commit aa6d7e8

Please sign in to comment.