LiveAntd.Components.Modal (live_antd v0.1.0)

Modal dialogs.

API

  • [ ] afterClose: Specify a function that will be called when modal is closed completely function -
  • [ ] bodyStyle: Body style for modal body element. Such as height, padding etc CSSProperties
  • [ ] cancelButtonProps: The cancel button props ButtonProps -
  • [x] cancelText: Text of the Cancel button ReactNode Cancel
  • [ ] centered: Centered Modal boolean false
  • [ ] closable: Whether a close (x) button is visible on top right of the modal dialog or not boolean true
  • [ ] closeIcon: Custom close icon
  • [ ] confirmLoading: Whether to apply loading visual effect for OK button or not boolean false
  • [ ] destroyOnClose: Whether to unmount child components on onClose boolean false
  • [ ] footer: Footer content, set as footer={null} when you don't need default buttons ReactNode (OK and Cancel buttons)
  • [ ] forceRender: Force render Modal boolean false
  • [ ] focusTriggerAfterClose: Whether need to focus trigger element after dialog is closed boolean true 4.9.0
  • [ ] getContainer: Return the mount node for Modal HTMLElement.
  • [ ] keyboard: Whether support press esc to close boolean true
  • [ ] mask: Whether show mask or not boolean true
  • [ ] maskClosable: Whether to close the modal dialog when the mask (area outside the modal) is clicked boolean true
  • [ ] maskStyle: Style for modal's mask element CSSProperties
  • [ ] modalRender: Custom modal content render (node: ReactNode) => ReactNode - 4.7.0
  • [ ] okButtonProps: The ok button props ButtonProps -
  • [x] okText: Text of the OK button ReactNode OK
  • [ ] okType: Button type of the OK button string primary
  • [x] style: Style of floating layer, typically used at least for adjusting the position CSSProperties -
  • [x] title: The modal dialog's title
  • [x] visible: Whether the modal dialog is visible or not
  • [x] width: Width of the modal dialog string
  • [ ] wrapClassName: The class name of the container of the modal dialog string -
  • [ ] zIndex: The z-index of the Modal
  • [x] onCancel: Specify a function that will be called when a user clicks mask, close button on top right or Cancel button function(e) -
  • [x] onOk: Specify a function that will be called when a user clicks the OK button

Example

<Modal

onOk={{ @okText }}
onCancel={{ @cancelText }}

Modal Content

Properties

  • onCancel :event
  • onOk :event
  • visible :boolean, default: false
  • title :string, default: "basic title"
  • cancalText :string, default: "cancel"
  • okText :string, default: "ok"
  • width :string, default: "520px"
  • class :css_class
  • style :string, default: "foo: bar"

Link to this section Summary

Functions

Callback implementation for Phoenix.LiveComponent.mount/1.

Callback implementation for Phoenix.LiveComponent.render/1.

Link to this section Functions

Callback implementation for Phoenix.LiveComponent.mount/1.

Link to this function

render(assigns)

Callback implementation for Phoenix.LiveComponent.render/1.