Updated JSdocs

This commit is contained in:
Alex Holliday
2024-05-07 14:30:00 -07:00
parent 6359fd52b6
commit bc463802d9
4 changed files with 16 additions and 6 deletions

View File

@@ -21,10 +21,14 @@ const levelConfig = {
};
/**
* @param {Object} Props
* @param {'primary' | 'secondary' | 'tertiary' | 'error'} level - The level of the button
* @param {string} label - The label of the button
* @param {boolean} [disabled] - Whether the button is disabled
* @param {Object} props
* @param {'primary' | 'secondary' | 'tertiary' | 'error'} props.level - The level of the button
* @param {string} props.label - The label of the button
* @param {boolean} [props.disabled] - Whether the button is disabled
* @returns {JSX.Element}
* @example
* // Render an error button
* <Button level="error" label="Error" disabled />
*/
const Button = ({ level, label, disabled }) => {

View File

@@ -14,7 +14,7 @@ import { useTheme } from "@mui/material";
* @param {Object} props
* @param {string} props.label - The label of the label
* @param {Styles} props.styles - CSS Styles passed from parent component
* @param {React.ReactNode} children - CSS Styles passed from parent component
* @param {React.ReactNode} children - Children passed from parent component
* @returns {JSX.Element}
*/

View File

@@ -26,8 +26,11 @@ const lightenColor = (color, percent) => {
* @component
* @param {Object} props
* @param {string} props.label - The label of the label
* @param {string} props.color - The color of the label
* @param {string} props.color - The color of the label, specified in #RRGGBB format
* @returns {JSX.Element}
* @example
* // Render a red label
* <ColoredLabel label="Label" color="#FF0000" />
*/
const ColoredLabel = ({ label, color }) => {

View File

@@ -8,6 +8,9 @@ import { useTheme } from "@mui/material";
* @param {Object} props
* @param {'Seen' | 'Waiting' | 'New' | 'Active'} props.status - The status for the label
* @returns {JSX.Element}
* @example
* // Render an active label
* <StatusLabel status="Active" />
*/
const StatusLabel = ({ status }) => {