1.0.4 • Published 1 month ago

tuo-modal v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month 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
1.0.4

1 month ago

1.0.2

2 months ago

1.0.3

2 months ago

1.0.1

3 months ago

1.0.0

3 months ago