Skip to content

Commit 8fa0cf3

Browse files
committed
Update README and peerDependencies.
1 parent 80c62b4 commit 8fa0cf3

File tree

2 files changed

+12
-45
lines changed

2 files changed

+12
-45
lines changed

README.md

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Polylang React Library
22

3-
A unified package of React components, icons, and utilities for Polylang projects, optimized for WordPress Gutenberg integration.
3+
A unified package of icons, hooks, and utilities for Polylang projects, optimized for WordPress Gutenberg integration.
44

55
## 📦 What's Included
66

7-
- **React Components** - UI components like `LanguageDropdown` and `LanguageFlag`
8-
- **SVG Icons** - Complete icon library for Polylang Pro
9-
- **API Middlewares** - WordPress REST API filtering utilities
7+
- **SVG Icons** - Complete icon library for Polylang projects
108
- **React Hooks** - Custom hooks for language management and state handling
9+
- **API Middlewares** - WordPress REST API filtering utilities
1110

1211
## 🚀 Installation
1312

@@ -23,27 +22,6 @@ The package automatically builds during installation via the `prepare` script. T
2322

2423
## 💻 Usage
2524

26-
### Components
27-
28-
```javascript
29-
import { LanguageDropdown, LanguageFlag } from '@wpsyntex/polylang-react-library';
30-
31-
function MyComponent() {
32-
const languages = new Map( [
33-
[ 'en', { slug: 'en', name: 'English', flag_url: '...' } ],
34-
[ 'fr', { slug: 'fr', name: 'Français', flag_url: '...' } ],
35-
] );
36-
37-
return (
38-
<LanguageDropdown
39-
handleChange={ ( slug ) => console.log( slug ) }
40-
languages={ languages }
41-
selectedLanguage={ languages.get( 'en' ) }
42-
/>
43-
);
44-
}
45-
```
46-
4725
### Icons
4826

4927
```javascript
@@ -56,7 +34,6 @@ import {
5634
trash,
5735
star,
5836
SubmenuIcon,
59-
DefaultLangIcon,
6037
} from '@wpsyntex/polylang-react-library';
6138

6239
function MyToolbar() {
@@ -132,11 +109,6 @@ npm run lint:fix # Fix automatically
132109
133110
## 📋 Available Exports
134111
135-
### Components
136-
- `LanguageDropdown` - Dropdown selector for languages
137-
- `LanguageFlag` - Flag display component
138-
139-
### Icons
140112
- `duplication` - Copy/duplicate icon
141113
- `pencil` - Edit icon
142114
- `plus` - Add/create icon
@@ -145,7 +117,6 @@ npm run lint:fix # Fix automatically
145117
- `trash` - Delete icon
146118
- `star` - Favorite/default icon
147119
- `SubmenuIcon` - Submenu navigation icon
148-
- `DefaultLangIcon` - Default language indicator
149120
150121
### Middlewares
151122
- `editorsRequestsFilter` - Filter WordPress editor requests
@@ -166,11 +137,9 @@ npm run lint:fix # Fix automatically
166137
This package requires the following peer dependencies (provided by consuming projects):
167138
168139
- `@wordpress/api-fetch` >= 7.0.0
169-
- `@wordpress/components` >= 27.0.0
170140
- `@wordpress/data` >= 10.0.0
171141
- `@wordpress/editor` >= 14.0.0
172142
- `@wordpress/element` >= 6.0.0
173-
- `@wordpress/i18n` >= 5.0.0
174143
- `@wordpress/primitives` >= 4.0.0
175144
- `lodash` >= 4.17.0
176145
- `react` >= 17.0.0

package.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,15 @@
3636
"@babel/cli": "^7.26.5",
3737
"@wordpress/babel-preset-default": "^8.10"
3838
},
39-
"peerDependencies": {
40-
"@wordpress/api-fetch": ">=7.0.0",
41-
"@wordpress/components": ">=27.0.0",
42-
"@wordpress/element": ">=6.0.0",
43-
"@wordpress/i18n": ">=5.0.0",
44-
"@wordpress/primitives": ">=4.0.0",
45-
"@wordpress/data": ">=10.0.0",
46-
"@wordpress/editor": ">=14.0.0",
47-
"lodash": ">=4.17.0",
48-
"react": ">=17.0.0"
49-
},
39+
"peerDependencies": {
40+
"@wordpress/api-fetch": ">=7.0.0",
41+
"@wordpress/data": ">=10.0.0",
42+
"@wordpress/editor": ">=14.0.0",
43+
"@wordpress/element": ">=6.0.0",
44+
"@wordpress/primitives": ">=4.0.0",
45+
"lodash": ">=4.17.0",
46+
"react": ">=17.0.0"
47+
},
5048
"devDependencies": {
5149
"@wordpress/scripts": "^31.4.0"
5250
},

0 commit comments

Comments
 (0)