Skip to main content
K
Last modified: 24/Jun/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
info
#isCollapsedByDefault
boolean
Decides whether the collapsible NotePanel is collapsed by default.
false
#isClosable
boolean
If true displays a close button and will require closeTooltipText prop
false
#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
() => null
#title
string | number | ReactElement<any, string | JSXElementConstructor<any>>
Decides to display a title using a collapse component

#Types

  • NotePanelProps: props of the NotePanel component processed by stratus
  • NotePanelInterface: NotePanelProps extended by Omit<HTMLAttributes<HTMLDivElement>, 'title'>

Read more about types here