Added docs and proptypes
This commit is contained in:
1 parent
50c23505c3
commit
c23899cbc4
1 file changed
+18
@@ -1,5 +1,19 @@
|
|||||||
|
import PropTypes from "prop-types";
|
||||||
import { Box, Stack } from "@mui/material";
|
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 }) => {
|
const PulseDot = ({ color }) => {
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
@@ -30,4 +44,8 @@ const PulseDot = ({ color }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
PulseDot.propTypes = {
|
||||||
|
color: PropTypes.string.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
export default PulseDot;
|
export default PulseDot;
|
||||||
Reference in new issue
Block a user