0.18.0 • Published 1 year ago

@martidev/react-modal-ts v0.18.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago
import { MyModal } from '@martidev/react-modal-ts';

-3- create open variable

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

-4- create hideModal function

        hideModal={async() => setOpen(false)}
img = 'https://myPictureAddress';

-2- you can custom as well the closing modal button, there is a default css style but by adding another class you can customize it.

closeBtnStyle = 'coloris';

and in a css file add your personal custom style

.coloris {
  background-color: #1f2243;
  color: white;
}

-3- you can also add a lot of content via the children props :

        <button type="button" onClick={() => setOpen(false)}>
          ok
        </button>
        <p>
          Lorem, ipsum dolor sit amet consectetur adipisicing elit. Doloribus
          omnis blanditiis veniam veritatis ullam officiis accusantium deserunt
          in repellat autem excepturi quidem temporibus magnam reiciendis est
          accusamus, adipisci provident quasi.
        </p>

-4- you can style the content you add into your modal:

.content {
  text-align: center;
  padding: 15px;
}

add your style via the css as you did with the closeBtnSyle.

0.18.0

1 year ago

0.17.0

1 year ago

0.16.0

2 years ago

0.15.0

2 years ago

0.14.0

2 years ago

0.13.0

2 years ago

0.12.0

2 years ago

0.11.0

2 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago