-
Notifications
You must be signed in to change notification settings - Fork 630
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an example CSS (basic) theme (#472)
* Let web target be implied, else it will includes require in react-refresh build * Add an example theme * Update theme/basic/README.md Co-authored-by: AdeleD <[email protected]> * Update theme/basic/README.md Co-authored-by: AdeleD <[email protected]> --------- Co-authored-by: AdeleD <[email protected]>
- Loading branch information
Showing
4 changed files
with
64 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Basic CSS theme | ||
|
||
## How to use it | ||
|
||
Add the `theme/basic/react-paginatte.css` file to your HTML page. For eg., after downloading it and making it available on your server as `/assets/css/react-paginate.css`: | ||
|
||
```html | ||
<link href="/assets/css/react-paginate.css" rel="stylesheet" /> | ||
``` | ||
|
||
Then load the `ReactPaginate` component by specifying the `className` prop to `react-paginate`. This will add the class to the `<ul>` container: | ||
|
||
```javascript | ||
import ReactPaginate from 'react-paginate'; | ||
|
||
|
||
function MyExampleApp() { | ||
// Manage offsets, page clicks, etc. ... (See main README.md) | ||
|
||
return ( | ||
<> | ||
<h2>Paginated page</h2> | ||
<ReactPaginate | ||
className="react-paginate" | ||
// ... | ||
/> | ||
</> | ||
); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
ul.react-paginate { | ||
margin-bottom: 2rem; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
list-style-type: none; | ||
padding: 0 5rem; | ||
} | ||
|
||
ul.react-paginate li a { | ||
border-radius: 7px; | ||
padding: 0.1rem 1rem; | ||
border: gray 1px solid; | ||
cursor: pointer; | ||
} | ||
ul.react-paginate li.previous a, | ||
ul.react-paginate li.next a, | ||
ul.react-paginate li.break a { | ||
border-color: transparent; | ||
} | ||
ul.react-paginate li.selected a { | ||
background-color: #0366d6; | ||
border-color: transparent; | ||
color: white; | ||
min-width: 32px; | ||
} | ||
ul.react-paginate li.disabled a { | ||
color: grey; | ||
} | ||
ul.react-paginate li.disable, | ||
ul.react-paginate li.disabled a { | ||
cursor: default; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters