1.0.6 • Published 11 months ago

tuo-modal v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

tuo-modal

modal with fullpage background (react)

Screenshot

fade-modal

Development

npm install
yarn install

npm run dev
yarn dev

Install

npm install tuo-modal
yarn add tuo-modal

Usage

const [open, setOpen] = useState<boolean>(false);

//ex btn
<button type="button" onClick={() => setOpen(true)}>
<TuoFadeModal open={open} onClose={() => setOpen(false)}>
  ...JSX.Element (content inside the modal)
</TuoFadeModal>

API

TuoFadeModal props

namedescriptiontypedefalut
classNameadditional css class modal without backgroundstiring
widthwidth of modalnumber / 'auto'300
heightheight of modalnumber / 'auto'400
modalColorbackground-color of modalstring'#fff'
modalRadiusborder-radius of modalnumber10
modalPaddingpadding of modalnumber10
backgroundColorbackground-color of backgroundstring'#0003'
clickBackgroundCloseonclose when clicked backgroundbooleantrue
closeBtnclose buttonbooleantrue
closeBtnColorcolor of close buttonstring'#333'
openopen modalboolean
onCloseclose function of modal() => void
closeAnimationEndfunction after close animation is complete() => void
1.0.6

11 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago