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
[](https://gitter.im/react-modal/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
9
9
10
10
## Table of Contents
11
11
12
-
-[Table of Contents](#Table-of-Contents)
13
-
-[Installation](#Installation)
14
-
-[API documentation](#API-documentation)
15
-
-[Examples](#Examples)
16
-
-[Demos](#Demos)
12
+
*[Installation](#installation)
13
+
*[API documentation](#api-documentation)
14
+
*[Examples](#examples)
15
+
*[Demos](#demos)
17
16
18
17
## Installation
19
18
20
-
To install, you can use [npm](https://npmjs.org/) or [Yarn](https://yarnpkg.com):
19
+
To install, you can use [npm](https://npmjs.org/) or [yarn](https://yarnpkg.com):
20
+
21
+
22
+
$ npm install react-modal
23
+
$ yarn add react-modal
21
24
22
-
```sh
23
-
npm install react-modal
24
-
# or
25
-
yarn add react-modal
26
-
```
27
25
28
26
## API documentation
29
27
@@ -37,48 +35,48 @@ Here is a simple example of react-modal being used in an app with some custom
37
35
styles and focusable input elements within the modal content:
38
36
39
37
```jsx
40
-
importReactfrom'react'
41
-
importReactDOMfrom'react-dom'
42
-
importModalfrom'react-modal'
38
+
importReactfrom'react';
39
+
importReactDOMfrom'react-dom';
40
+
importModalfrom'react-modal';
43
41
44
42
constcustomStyles= {
45
-
content: {
46
-
top:'50%',
47
-
left:'50%',
48
-
right:'auto',
49
-
bottom:'auto',
50
-
marginRight:'-50%',
51
-
transform:'translate(-50%, -50%)',
52
-
},
53
-
}
43
+
content: {
44
+
top:'50%',
45
+
left:'50%',
46
+
right:'auto',
47
+
bottom:'auto',
48
+
marginRight:'-50%',
49
+
transform:'translate(-50%, -50%)'
50
+
}
51
+
};
54
52
55
53
// Make sure to bind modal to your appElement (http://reactcommunity.org/react-modal/accessibility/)
0 commit comments