ModalHeader()
Adds a header section to a modal dialog. The header appears at the top of the modal with distinct styling.
Syntax
Result = MaterialSB::ModalHeader(Text.s, Parent = #Null)
Parameters
| Text.s | The header text (can include HTML). |
| Parent | Optional. Parent modal element. If #Null, uses the current modal. |
Return Value
Returns the modal-header div element.
Remarks
Place ModalHeader() before ModalContent() for proper layout. The header does not push to the parent stack.
Example
Global myModal
Procedure CloseModal()
MaterialSB::ModalClose(myModal)
EndProcedure
Procedure ShowModal()
MaterialSB::ModalOpen(myModal)
EndProcedure
Procedure Main(Success)
If Success
; Create modal with header
myModal = MaterialSB::Modal()
MaterialSB::ModalHeader("Welcome!")
MaterialSB::ModalContent()
MaterialSB::Append(MaterialSB::Paragraph("This modal has a styled header section."))
MaterialSB::Append(MaterialSB::Paragraph("Headers help users understand the modal's purpose at a glance."))
MaterialSB::CloseCurrentParent()
MaterialSB::ModalFooter()
MaterialSB::Button("Close", @CloseModal())
MaterialSB::CloseCurrentParent()
MaterialSB::Init(myModal, #Null)
; Main content
MaterialSB::Row(MaterialSB::#Grid_Container)
MaterialSB::Col(12)
MaterialSB::Button("Open Modal", @ShowModal())
MaterialSB::CloseCurrentParent()
MaterialSB::CloseCurrentParent()
EndIf
EndProcedure
MaterialSB::Download(@Main())