@diana-ui/modal
TypeScript icon, indicating that this package has built-in type declarations

5.0.3 • Public • Published

@diana-ui/modal

Modal component uses react-modal.

Is divided into 3 possible children: ModalHeader, ModalBody and ModalFooter.

Modal Header

Used to apply Modal title, description, close button.

<ModalHeader title="Title" description="Subtitle" />

It's possible to extend its styles by doing:

import { ModalHeader as YModalHeader } from '@diana-ui/modal'

const ModalHeader = YModalHeader.extendStyles(theme => {
  // Header wrapper section
  header: {},
  // Whole title row section (without subtitle)
  titleWrapper: {},
  // Close icon
  closeIcon: {},
  // Icon behind title
  icon: {},
  // Title text
  title: {},
  // Subtitle text
  description: {}
})

Modal Body

Actual content for the Modal

<ModalBody>Content</ModalBody>

It's possible to extend its styles by doing:

import { ModalBody as YModalBody } from '@diana-ui/modal'

const ModalBody = YModalBody.extendStyles(theme => {
  // All body section
  body: {},
})

Modal Footer

Footer for the Modal. This will be mainly buttons.

<ModalFooter>
  <BaseButton>Button 1</BaseButton>
  <BaseButton>Button 2</BaseButton>
</ModalFooter>

It's possible to extend its styles by doing:

import { ModalFooter as YModalFooter } from '@diana-ui/modal'

const ModalFooter = YModalFooter.extendStyles(theme => {
  // All footer section
  footer: {},
})

Dependencies (3)

Dev Dependencies (1)

Package Sidebar

Install

npm i @diana-ui/modal

Weekly Downloads

5

Version

5.0.3

License

MIT

Unpacked Size

43.8 kB

Total Files

42

Last publish

Collaborators

  • ymetis