Skip to content

Commit c881751

Browse files
authored
Update README.md
1 parent a19dd50 commit c881751

File tree

1 file changed

+25
-32
lines changed

1 file changed

+25
-32
lines changed

README.md

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
This package provides ready to use pagination components using tailwindcss, with multiple theme according to your taste.
2+
This package provides ready to use pagination components using tailwindcss inside (you don't need to have it).
33

44

55
For example ***instead of*** :
@@ -12,26 +12,27 @@ For example ***instead of*** :
1212

1313
You may use in blade:
1414
```html
15-
<x-paginate :elems="$users" />
15+
<x-pagination::gray-circled :elems="$users" />
1616
```
1717

18-
And it previews with ***default*** theme :
18+
And it previews with [gray-circled](#gray-circled) theme :
1919

20-
<img src="/screens/light.png" alt="light theme" width="" />
20+
<img src="/screens/gray-circled.png" alt="gray-circled theme" width="" />
2121

2222
But you can **change** **themes** and more **settings** read **[Usage](#usage)**.
2323

2424
<br/>
2525

2626

2727
- **[Installation](#installation)**
28-
- **[Usage](#usage)**
28+
- **[Components](#Components)**
2929
- **[Themes](#themes)**
3030

3131

3232
## Prerequisites
3333

34-
**Tailwindcss**, **Laravel 8**, **PHP 8**
34+
- Laravel 8
35+
- PHP 8
3536

3637

3738
## Installation
@@ -40,33 +41,26 @@ But you can **change** **themes** and more **settings** read **[Usage](#usage)**
4041
composer require amir-hossein5/laravel-components
4142
```
4243

43-
If you are using tailwindcss's purge, add path to your purge section:
44+
## Components
4445

45-
```js
46-
// tailwind.config.js
47-
48-
purge: [
49-
...
50-
51-
"./vendor/amir-hossein5/laravel-components/resources/**/*.blade.php",
52-
],
53-
```
54-
55-
And you may run ```npm run watch``` or, ```npm run dev``` or, ```npm run prod```
46+
- ### Pagination
5647

57-
## Usage
48+
For pagination use ```<x-pagination::gray-circled``` tag with its theme name ```:elems="" />``` to pass pagination items.
49+
and for styles:
50+
```html
51+
...
5852

59-
- ### Pagination
53+
@lComponentStyles('pagination')
6054

61-
For pagination use ```<x-paginate />``` tag with ```:elems=""``` to pass pagination items.
55+
</head>
56+
```
6257

6358
All parameters for paginate tag that you may use :
6459

6560

6661
| parameter | description | default |
6762
|-------------------------------------- |-------------------------------------------------------------------- | ---------------------------------|
6863
| :elems="" | pagination items | |
69-
| theme="string" | name of theme. find themes [here](#themes) | [tailwind-light](#tailwind-light)|
7064
| prev="string" | previous button's html | laravel's default |
7165
| next="string" | next button's html | laravel's default |
7266
| prevInResponsive="string" | previous button's html in responsive pagination | laravel's default |
@@ -79,9 +73,8 @@ All parameters for paginate tag that you may use :
7973
for example:
8074

8175
```html
82-
<x-paginate
76+
<x-pagination::light-underlined
8377
:elems="$users"
84-
theme="tailwind-gray-circled"
8578
:showPaginatorDetails="false"
8679
:showDisabledButtons="true"
8780
/>
@@ -92,36 +85,36 @@ for example:
9285

9386
- ### pagination
9487

95-
- ### tailwind-light
88+
- ### light
9689

9790
<img src="/screens/light.png" alt="light theme" />
9891

9992

100-
- ### tailwind-gray
93+
- ### gray
10194

10295
![gray-theme](screens/gray.png)
10396
![gray-theme](/screens/gray1.png)
10497

10598

106-
- ### tailwind-light-circled
99+
- ### light-circled
107100

108101

109102
<img src="/screens/light-circled.png" alt="light-circled theme" />
110103

111104

112-
- ### tailwind-gray-circled
105+
- ### gray-circled
113106

114107

115108
<img src="/screens/gray-circled.png" alt="gray-circled theme" />
116109

117110

118-
- ### tailwind-light-underlined
111+
- ### light-underlined
119112

120113

121114
<img src="/screens/light-underlined.png" alt="light-underlined theme" />
122115

123116

124-
- ### tailwind-red-pill
117+
- ### red-pill
125118

126119

127120
<img src="/screens/red-pill.png" alt="red-pill theme" />
@@ -132,10 +125,10 @@ for example:
132125
## Modification
133126

134127
For modification each component write ```vendor:publish``` with tag of **component name** and intended **theme name**.
135-
For example for **pagination** and theme of **tailwind-gray**:
128+
For example for **pagination** and theme of **gray**:
136129

137130
```bash
138-
php artisan vendor:publish --tag=pagination-tailwind-gray
131+
php artisan vendor:publish --tag=pagination-gray
139132
```
140133

141134

0 commit comments

Comments
 (0)