Last modified: 4/Oct/2024
NotePanel
NotePanels are used to notify the user of a warning or dangerous message.
#Usage
import { NotePanel } from '@kinsta/stratus'
const MyComponent = () => (
<NotePanel isClosable closeTooltipText="Close panel">
Warning message here!
</NotePanel>
)
#Props
#type
"info" | "warning" | "danger" | "success"
Determines the color scheme
#isCollapsedByDefault
boolean
Decides whether the collapsible NotePanel is collapsed by default.
#isClosable
boolean
If
true
displays a close button and will require closeTooltipText
prop#closeTooltipText
string | ReactElement<any, string | JSXElementConstructor<any>>
Tooltip text for the close button.
#onClose
() => void
The function to be called when clicking on the close button
#title
string | number | ReactElement<any, string | JSXElementConstructor<any>>
Decides to display a title using a collapse component
#Types
NotePanelProps
: props of theNotePanel
component processed by stratusNotePanelInterface
:NotePanelProps
extended byOmit<HTMLAttributes<HTMLDivElement>, 'title'>
Read more about types here