diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-11 09:47:25 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-11 09:47:25 +0700 |
| commit | 92c2a229d9c9b510d71b928978872a8b107e9d5a (patch) | |
| tree | 8d8161a49a0bdc46d4c28d3f2682bb485314a41d /src/core/components/elements/Alert | |
| parent | 62bebc1d33fd090d7666e18e7a0326ef7ef36897 (diff) | |
Documentation and refactor code
Diffstat (limited to 'src/core/components/elements/Alert')
| -rw-r--r-- | src/core/components/elements/Alert/Alert.jsx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/components/elements/Alert/Alert.jsx b/src/core/components/elements/Alert/Alert.jsx index 695be8a3..cf84b591 100644 --- a/src/core/components/elements/Alert/Alert.jsx +++ b/src/core/components/elements/Alert/Alert.jsx @@ -1,3 +1,13 @@ +/** + * The Alert component is used to display different types of alerts or notifications + * with different styles based on the provided type prop. + * + * @param {Object} props - Props received by the component. + * @param {ReactNode} props.children - The content to be displayed inside the alert. + * @param {string} props.className - Additional CSS class names for the alert. + * @param {string} props.type - The type of the alert ('info', 'success', or 'warning'). + * @returns {JSX.Element} - Rendered Alert component. + */ const Alert = ({ children, className, type }) => { let typeClass = '' switch (type) { |
