Updated JSdocs
This commit is contained in:
1 parent
6359fd52b6
commit
bc463802d9
4 files changed
+16
-6
No files matched your search
@@ -21,10 +21,14 @@ const levelConfig = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} Props
|
* @param {Object} props
|
||||||
* @param {'primary' | 'secondary' | 'tertiary' | 'error'} level - The level of the button
|
* @param {'primary' | 'secondary' | 'tertiary' | 'error'} props.level - The level of the button
|
||||||
* @param {string} label - The label of the button
|
* @param {string} props.label - The label of the button
|
||||||
* @param {boolean} [disabled] - Whether the button is disabled
|
* @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 }) => {
|
const Button = ({ level, label, disabled }) => {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { useTheme } from "@mui/material";
|
|||||||
* @param {Object} props
|
* @param {Object} props
|
||||||
* @param {string} props.label - The label of the label
|
* @param {string} props.label - The label of the label
|
||||||
* @param {Styles} props.styles - CSS Styles passed from parent component
|
* @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}
|
* @returns {JSX.Element}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,11 @@ const lightenColor = (color, percent) => {
|
|||||||
* @component
|
* @component
|
||||||
* @param {Object} props
|
* @param {Object} props
|
||||||
* @param {string} props.label - The label of the label
|
* @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}
|
* @returns {JSX.Element}
|
||||||
|
* @example
|
||||||
|
* // Render a red label
|
||||||
|
* <ColoredLabel label="Label" color="#FF0000" />
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const ColoredLabel = ({ label, color }) => {
|
const ColoredLabel = ({ label, color }) => {
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ import { useTheme } from "@mui/material";
|
|||||||
* @param {Object} props
|
* @param {Object} props
|
||||||
* @param {'Seen' | 'Waiting' | 'New' | 'Active'} props.status - The status for the label
|
* @param {'Seen' | 'Waiting' | 'New' | 'Active'} props.status - The status for the label
|
||||||
* @returns {JSX.Element}
|
* @returns {JSX.Element}
|
||||||
|
* @example
|
||||||
|
* // Render an active label
|
||||||
|
* <StatusLabel status="Active" />
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const StatusLabel = ({ status }) => {
|
const StatusLabel = ({ status }) => {
|
||||||
|
|||||||
Reference in new issue
Block a user