⬅️ Back to Table of Contents
📄 AlertBlock.tsx
📊 Analysis Summary
| Metric |
Count |
| 🔧 Functions |
1 |
| 📦 Imports |
1 |
| 💠 JSX Elements |
2 |
| 📐 Interfaces |
1 |
📚 Table of Contents
🛠️ File Location:
📂 packages/website/src/components/layout/AlertBlock.tsx
📦 Imports
JSX Elements
| Component |
Type |
Props |
Children |
div |
element |
className={admonition alert alert--${props.type}} |
|
div |
element |
className="admonition-content" |
{props.children} |
Functions
AlertBlock(props: AlertBlockProps): React.JSX.Element
Code
function AlertBlock(props: AlertBlockProps): React.JSX.Element {
return (
<div className={`admonition alert alert--${props.type}`}>
<div className="admonition-content">{props.children}</div>
</div>
);
}
- Parameters:
props: AlertBlockProps
- Return Type:
React.JSX.Element
Interfaces
AlertBlockProps
Interface Code
export interface AlertBlockProps {
readonly children: React.ReactNode;
readonly type: 'danger' | 'info' | 'note' | 'success' | 'warning';
}
Properties
| Name |
Type |
Optional |
Description |
children |
React.ReactNode |
✗ |
|
type |
'danger' | 'info' | 'note' | 'success' | 'warning' |
✗ |
|