Modal Footer
Standardized left/right button layout for modal footers. Replaces custom footer HTML across 30+ modals.
Two Buttons (Default)
<?= ws_modal_footer([
'cancel' => ['text' => 'Cancel', 'id' => 'cancelBtn'],
'primary' => ['text' => 'Export Now', 'id' => 'exportBtn'],
]) ?>Three Buttons (Left Action)
<?= ws_modal_footer([
'left' => ['text' => 'Download .ics', 'icon' => 'download',
'id' => 'downloadBtn', 'variant' => 'ghost'],
'cancel' => ['text' => 'Cancel', 'id' => 'cancelBtn'],
'primary' => ['text' => 'Send Invite', 'id' => 'sendBtn', 'icon' => 'send'],
]) ?>Single Full-Width Button
<?= ws_modal_footer([
'primary' => ['text' => 'Add Activity', 'id' => 'addBtn', 'fullWidth' => true],
]) ?>API
| Param | Type | Default | Description |
|---|---|---|---|
cancel | array | null | {text, id, class} |
primary | array | null | {text, id, icon, class, fullWidth} |
left | array | null | {text, id, icon, variant, class} |
id | string | null | Footer element ID |