Skip to content

Commit 16f2097

Browse files
committed
feat: Add typedef to Alert component
1 parent dccc685 commit 16f2097

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

react/Alert/index.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,17 @@ const Alert = forwardRef(
9191

9292
Alert.displayName = 'Alert'
9393

94+
/**
95+
* @typedef {Object} AlertProps
96+
* @property {string} className - Classname of the alert
97+
* @property {React.FC<PropTypes.InferProps<typeof Icon.propTypes>>|false} icon - Icon component to display in the alert (or false to hide it)
98+
* @property {'primary'|'secondary'|'success'|'error'|'warning'|'info'} severity - Severity of the alert (default: primary)
99+
* @property {boolean} block - Block the alert to the full width of its container (default: false)
100+
* @property {string} color - Background color of the alert
101+
* @property {boolean} square - Square the alert corners (default: false)
102+
* @property {'standard'|'outlined'|'filled'} variant - Variant of the alert (default: standard)
103+
*/
104+
94105
export const AlertPropTypes = {
95106
className: PropTypes.string,
96107
icon: PropTypes.oneOfType([PropTypes.element, PropTypes.bool]),

0 commit comments

Comments
 (0)