native-x-modal
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

native-x-modal

semantic-release

This component adds space between to other components

Install

Yarn

yarn add native-x-modal

NPM

npm install native-x-modal

Usage

import { Modal } from 'native-x-modal'

function MyComponent() {
  const [visible, setVisible] = React.useState(false)
  return (
    <Modal visible={visible} onClose={() => setVisible(false)}>
      ...
    </Modal>
  )
}

API

Property Default Value Usage
children?: string Content
visible?: boolean Show modal
showClose?: boolean Show close button
width?: number Width of the modal
onClose?: () => void On close modal

Confirmation Modal

import { ConfirmationModal } from 'native-x-modal'

function MyComponent() {
  const [visible, setVisible] = React.useState(false)
  return (
    <ConfirmationModal
      visible={visible}
      onOk={onOkFn}
      onCancel={onCancelFn}
      okText='OK'
      cancelText='Cancel'
      onClose={() => setVisible(false)}>
      ...
    </Modal>
  )
}
Property Default Value Usage
children?: string Content
visible?: boolean Show modal
showClose?: boolean Show close button
width?: number Width of the modal
onClose?: () => void On close modal
onOk?: () => void On click on ok button
onCancel?: () => void On click on cancel button
okText?: string OK Label of ok button
okButtonBackgroundColor?: string Background color of ok button
okTextColor?: string Text color of ok button
cancelText?: string Cancel Label of cancel button
cancelButtonBackgroundColor?: string Background color of cancel button
cancelTextColor?: string Text color of cancel button

Automatic Release

Here is an example of the release type that will be done based on a commit messages:

Commit message Release type
fix: [comment] Patch Release
feat: [comment] Minor Feature Release
perf: [comment] Major Feature Release
doc: [comment] No Release
refactor: [comment] No Release
chore: [comment] No Release

Readme

Keywords

none

Package Sidebar

Install

npm i native-x-modal

Weekly Downloads

243

Version

1.0.12

License

MIT

Unpacked Size

11.9 kB

Total Files

17

Last publish

Collaborators

  • rintoj