1.0.3 • Published 2 years ago

tlouvet-react-modal v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago
  padding: 0 30px;
  background-color: white;
  border-radius: 8px;
  width: 65%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 0 10px #000;
import { useState } from "react";
import { Modal } from "tlouvet-react-modal";

export function TestModal(){
  const [openModal, setOpenModal] = useState(false);

  return (
    <>
      <button onClick={() => setOpenModal(true)}>OpenModal</button>

      <Modal open={openModal} onClose={setOpenModal}>
        <div>
          <p> Modal Opened </p>
          <p> Thank you for using TLouvet-react-modal </p> 
        </div>
      </Modal>
    </>
  )
}
import { useState } from "react";
import { Modal } from "tlouvet-react-modal";

export function TestModal(){
  const [openModal, setOpenModal] = useState(false);

  return (
    <>
      <button onClick={() => setOpenModal(true)}>OpenModal</button>

      <Modal 
        open={openModal} 
        onClose={setOpenModal} 
        withDefaultClose={false} 
        wrapperStyle={{backgroundColor: `black`, color: `white`}}
      >
          <div>
            <p> Modal Opened </p>
            <p> Thank you for using TLouvet-react-modal </p> 
            <button onClick={() => setOpenModal(false)}>Close<button>
          </div>
      </Modal>
    </>
  )
}
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago