Added docs and proptypes

This commit is contained in:
Daniel Cojocea committed 2024-08-22 12:24:56 -04:00
1 parent 50c23505c3
commit c23899cbc4
1 file changed
+18
@@ -1,5 +1,19 @@
import PropTypes from "prop-types";
import { Box, Stack } from "@mui/material";
/**
* A component that renders a pulsating dot with a specified color.
*
* @component
* @example
* // Example usage:
* <PulseDot color="#f00" />
*
* @param {Object} props
* @param {string} props.color - The color of the dot.
* @returns {JSX.Element} The PulseDot component.
*/
const PulseDot = ({ color }) => {
return (
<Stack
@@ -30,4 +44,8 @@ const PulseDot = ({ color }) => {
);
};
PulseDot.propTypes = {
color: PropTypes.string.isRequired,
};
export default PulseDot;