You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[added] Support using multiple document.body classes
* update `bodyOpenClassName` prop to handle adding and removing multiple
class names
* update String#includes polyfill to work properly
* ensure shared classes on `document.body` persist on one modal close if
multiple modals are open
* create new helper for adding/removing class names from body element
* remove unmaintained and obsolete `element-class` library
* rename refCount private variable `modals` to `classListMap`
* create `get` method on refCount helper for public access to the class
list count
Sometimes it may be preferable to use CSS classes rather than inline styles. You can use the `className` and `overlayClassName` props to specify a given CSS class for each of those.
4
-
You can override the default class that is added to `document.body` when the modal is open by defining a property `bodyOpenClassName`.
3
+
Sometimes it may be preferable to use CSS classes rather than inline styles.
5
4
6
-
It's required that `bodyOpenClassName` must be `constant string`, otherwise we would end up with a complex system to manage which class name
7
-
should appear or be removed from `document.body` from which modal (if using multiple modals simultaneously).
5
+
You can use the `className` and `overlayClassName` props to specify a given CSS
6
+
class for each of those.
7
+
8
+
You can override the default class that is added to `document.body` when the
9
+
modal is open by defining a property `bodyOpenClassName`.
10
+
11
+
It's required that `bodyOpenClassName` must be `constant string`, otherwise we
12
+
would end up with a complex system to manage which class name should appear or
13
+
be removed from `document.body` from which modal (if using multiple modals
14
+
simultaneously).
15
+
16
+
`bodyOpenClassName` can support adding multiple classes to `document.body` when
17
+
the modal is open. Add as many class names as you desire, delineated by spaces.
18
+
19
+
Note: If you provide those props all default styles will not be applied, leaving
20
+
all styles under control of the CSS class.
8
21
9
-
Note: If you provide those props all default styles will not be applied, leaving all styles under control of the CSS class.
10
22
The `portalClassName` can also be used however there are no styles by default applied
0 commit comments