react-datepicker-bkrdmrcioglu 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +194 -94
- package/components/DarkModeToggle.tsx +39 -9
- package/components/DatePicker.tsx +596 -174
- package/components/DateRangePicker.tsx +506 -39
- package/components/LanguageSelector.tsx +9 -8
- package/components/TimePicker.tsx +252 -0
- package/components/index.ts +14 -1
- package/components/styles.css +703 -0
- package/lib/i18n.ts +179 -11
- package/lib/theme/ThemeProvider.tsx +106 -0
- package/lib/theme/index.ts +3 -0
- package/lib/theme/themes.ts +212 -0
- package/lib/theme/types.ts +62 -0
- package/package.json +17 -4
package/README.md
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
# React DatePicker
|
|
2
2
|
|
|
3
|
-
Modern,
|
|
3
|
+
Modern, customizable, and user-friendly React DatePicker component with dark mode and multi-language support.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://github.com/bkrdmrcioglu/react-datepicker)
|
|
6
|
+
[](https://react-datepicker-mu.vercel.app)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
- ✅ **Dark Mode** - Tam karanlık mod desteği
|
|
9
|
-
- ✅ **11 Dil Desteği** - English, Türkçe, Deutsch, Français, Español, Italiano, Português, Русский, 日本語, 中文, العربية
|
|
10
|
-
- ✅ Tarih seçimi
|
|
11
|
-
- ✅ Tarih ve saat seçimi
|
|
12
|
-
- ✅ Tarih aralığı seçimi (DateRangePicker)
|
|
13
|
-
- ✅ Min/Max tarih kısıtlaması
|
|
14
|
-
- ✅ Devre dışı bırakılabilir
|
|
15
|
-
- ✅ TypeScript desteği
|
|
16
|
-
- ✅ Tamamen özelleştirilebilir
|
|
17
|
-
- ✅ Responsive tasarım
|
|
8
|
+
## 🚀 Features
|
|
18
9
|
|
|
19
|
-
|
|
10
|
+
- ✅ Modern and elegant design
|
|
11
|
+
- ✅ **Dark Mode** - Full dark mode support
|
|
12
|
+
- ✅ **11 Language Support** - English, Turkish, German, French, Spanish, Italian, Portuguese, Russian, Japanese, Chinese, Arabic
|
|
13
|
+
- ✅ **Theme System** - 4 preset themes + custom theme support
|
|
14
|
+
- ✅ **Storybook** - Interactive component showcase
|
|
15
|
+
- ✅ **API Documentation** - Complete API reference
|
|
16
|
+
- ✅ **Test Coverage** - 90+ unit tests
|
|
17
|
+
- ✅ Date selection
|
|
18
|
+
- ✅ Date and time selection
|
|
19
|
+
- ✅ Date range selection (DateRangePicker)
|
|
20
|
+
- ✅ Min/Max date constraints
|
|
21
|
+
- ✅ Time Picker (TimePicker)
|
|
22
|
+
- ✅ Disableable
|
|
23
|
+
- ✅ TypeScript support
|
|
24
|
+
- ✅ Fully customizable
|
|
25
|
+
- ✅ Responsive design
|
|
20
26
|
|
|
21
|
-
|
|
27
|
+
|
|
28
|
+
## 📦 Installation
|
|
29
|
+
|
|
30
|
+
### Install via NPM
|
|
22
31
|
|
|
23
32
|
```bash
|
|
24
33
|
npm install react-datepicker-bkrdmrcioglu
|
|
25
|
-
#
|
|
34
|
+
# or
|
|
26
35
|
yarn add react-datepicker-bkrdmrcioglu
|
|
27
|
-
#
|
|
36
|
+
# or
|
|
28
37
|
pnpm add react-datepicker-bkrdmrcioglu
|
|
29
38
|
```
|
|
30
39
|
|
|
31
|
-
###
|
|
40
|
+
### Requirements
|
|
32
41
|
|
|
33
|
-
|
|
42
|
+
- React 16.8+
|
|
43
|
+
- React DOM 16.8+
|
|
34
44
|
|
|
35
|
-
|
|
36
|
-
npm install -D tailwindcss postcss autoprefixer
|
|
37
|
-
npx tailwindcss init -p
|
|
38
|
-
```
|
|
45
|
+
### Import Styles
|
|
39
46
|
|
|
40
|
-
|
|
47
|
+
The component comes with its own CSS. Import it in your root layout or entry file:
|
|
41
48
|
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
content: [
|
|
45
|
-
"./src/**/*.{js,jsx,ts,tsx}",
|
|
46
|
-
"./node_modules/react-datepicker-bkrdmrcioglu/**/*.{js,jsx,ts,tsx}"
|
|
47
|
-
],
|
|
48
|
-
darkMode: 'class', // Dark mode için
|
|
49
|
-
// ... diğer ayarlarınız
|
|
50
|
-
}
|
|
49
|
+
```tsx
|
|
50
|
+
import 'react-datepicker-bkrdmrcioglu/dist/style.css';
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
## 🏃
|
|
53
|
+
## 🏃 Development (For This Repo)
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
56
|
npm install
|
|
57
57
|
npm run dev
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
Open [http://localhost:3000](http://localhost:3000) in your browser.
|
|
61
61
|
|
|
62
|
-
## 📖
|
|
62
|
+
## 📖 Usage
|
|
63
63
|
|
|
64
|
-
###
|
|
64
|
+
### Basic Usage
|
|
65
65
|
|
|
66
66
|
```tsx
|
|
67
67
|
import { DatePicker } from 'react-datepicker-bkrdmrcioglu';
|
|
@@ -80,58 +80,58 @@ function MyComponent() {
|
|
|
80
80
|
}
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
###
|
|
83
|
+
### Language Support
|
|
84
84
|
|
|
85
85
|
```tsx
|
|
86
86
|
import { DatePicker } from 'react-datepicker-bkrdmrcioglu';
|
|
87
87
|
import type { Language } from 'react-datepicker-bkrdmrcioglu';
|
|
88
88
|
|
|
89
|
-
//
|
|
89
|
+
// English (default)
|
|
90
90
|
<DatePicker language="en" />
|
|
91
91
|
|
|
92
|
-
//
|
|
92
|
+
// Turkish
|
|
93
93
|
<DatePicker language="tr" />
|
|
94
94
|
|
|
95
|
-
//
|
|
95
|
+
// German
|
|
96
96
|
<DatePicker language="de" />
|
|
97
97
|
|
|
98
|
-
//
|
|
98
|
+
// French
|
|
99
99
|
<DatePicker language="fr" />
|
|
100
100
|
|
|
101
|
-
//
|
|
101
|
+
// Spanish
|
|
102
102
|
<DatePicker language="es" />
|
|
103
103
|
|
|
104
|
-
//
|
|
104
|
+
// Italian
|
|
105
105
|
<DatePicker language="it" />
|
|
106
106
|
|
|
107
|
-
//
|
|
107
|
+
// Portuguese
|
|
108
108
|
<DatePicker language="pt" />
|
|
109
109
|
|
|
110
|
-
//
|
|
110
|
+
// Russian
|
|
111
111
|
<DatePicker language="ru" />
|
|
112
112
|
|
|
113
|
-
//
|
|
113
|
+
// Japanese
|
|
114
114
|
<DatePicker language="ja" />
|
|
115
115
|
|
|
116
|
-
//
|
|
116
|
+
// Chinese
|
|
117
117
|
<DatePicker language="zh" />
|
|
118
118
|
|
|
119
|
-
//
|
|
119
|
+
// Arabic
|
|
120
120
|
<DatePicker language="ar" />
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
###
|
|
123
|
+
### Date and Time Selection
|
|
124
124
|
|
|
125
125
|
```tsx
|
|
126
126
|
<DatePicker
|
|
127
127
|
value={date}
|
|
128
128
|
onChange={setDate}
|
|
129
129
|
showTime={true}
|
|
130
|
-
placeholder="
|
|
130
|
+
placeholder="Select date and time..."
|
|
131
131
|
/>
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
### Min/Max
|
|
134
|
+
### Min/Max Date Constraints
|
|
135
135
|
|
|
136
136
|
```tsx
|
|
137
137
|
const minDate = new Date();
|
|
@@ -147,7 +147,7 @@ maxDate.setDate(maxDate.getDate() + 30);
|
|
|
147
147
|
/>
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
###
|
|
150
|
+
### Date Range Selection
|
|
151
151
|
|
|
152
152
|
```tsx
|
|
153
153
|
import { DateRangePicker } from 'react-datepicker-bkrdmrcioglu';
|
|
@@ -170,45 +170,76 @@ function MyComponent() {
|
|
|
170
170
|
}
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
### Time Picker
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
```tsx
|
|
176
|
+
import { TimePicker } from 'react-datepicker-bkrdmrcioglu';
|
|
177
|
+
import { useState } from 'react';
|
|
176
178
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
| `value` | `Date \| null` | `undefined` | Seçili tarih |
|
|
180
|
-
| `onChange` | `(date: Date \| null) => void` | `undefined` | Tarih değiştiğinde çağrılır |
|
|
181
|
-
| `placeholder` | `string` | `"Tarih seçin..."` | Input placeholder metni |
|
|
182
|
-
| `minDate` | `Date` | `undefined` | Minimum seçilebilir tarih |
|
|
183
|
-
| `maxDate` | `Date` | `undefined` | Maksimum seçilebilir tarih |
|
|
184
|
-
| `disabled` | `boolean` | `false` | Devre dışı bırakma |
|
|
185
|
-
| `className` | `string` | `""` | Ek CSS sınıfları |
|
|
186
|
-
| `showTime` | `boolean` | `false` | Saat seçimi göster |
|
|
187
|
-
| `format` | `string` | `"DD/MM/YYYY"` | Tarih formatı |
|
|
188
|
-
| `language` | `Language` | `"en"` | Dil seçimi (en, tr, de, fr, es, it, pt, ru, ja, zh, ar) |
|
|
179
|
+
function MyComponent() {
|
|
180
|
+
const [time, setTime] = useState<string | null>(null);
|
|
189
181
|
|
|
190
|
-
|
|
182
|
+
return (
|
|
183
|
+
<TimePicker
|
|
184
|
+
value={time}
|
|
185
|
+
onChange={setTime}
|
|
186
|
+
placeholder="Select time..."
|
|
187
|
+
/>
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## 🔧 API Reference
|
|
193
|
+
|
|
194
|
+
### DatePicker Props
|
|
191
195
|
|
|
192
|
-
| Prop |
|
|
193
|
-
|
|
194
|
-
| `
|
|
195
|
-
| `
|
|
196
|
-
| `
|
|
197
|
-
| `
|
|
198
|
-
| `
|
|
199
|
-
| `
|
|
200
|
-
| `
|
|
201
|
-
| `
|
|
196
|
+
| Prop | Type | Default | Description |
|
|
197
|
+
|------|------|---------|-------------|
|
|
198
|
+
| `value` | `Date \| null` | `undefined` | Selected date |
|
|
199
|
+
| `onChange` | `(date: Date \| null) => void` | `undefined` | Called when date changes |
|
|
200
|
+
| `placeholder` | `string` | `"Select date..."` | Input placeholder text |
|
|
201
|
+
| `minDate` | `Date` | `undefined` | Minimum selectable date |
|
|
202
|
+
| `maxDate` | `Date` | `undefined` | Maximum selectable date |
|
|
203
|
+
| `disabled` | `boolean` | `false` | Disable the picker |
|
|
204
|
+
| `className` | `string` | `""` | Additional CSS classes |
|
|
205
|
+
| `showTime` | `boolean` | `false` | Show time selection |
|
|
206
|
+
| `format` | `string` | `"DD/MM/YYYY"` | Date format |
|
|
207
|
+
| `language` | `Language` | `"en"` | Language selection (en, tr, de, fr, es, it, pt, ru, ja, zh, ar) |
|
|
202
208
|
|
|
203
|
-
|
|
209
|
+
### DateRangePicker Props
|
|
204
210
|
|
|
205
|
-
|
|
211
|
+
| Prop | Type | Default | Description |
|
|
212
|
+
|------|------|---------|-------------|
|
|
213
|
+
| `startDate` | `Date \| null` | `undefined` | Start date |
|
|
214
|
+
| `endDate` | `Date \| null` | `undefined` | End date |
|
|
215
|
+
| `onChange` | `(start: Date \| null, end: Date \| null) => void` | `undefined` | Called when dates change |
|
|
216
|
+
| `placeholder` | `string` | `"Select date range..."` | Placeholder text |
|
|
217
|
+
| `minDate` | `Date` | `undefined` | Minimum selectable date |
|
|
218
|
+
| `maxDate` | `Date` | `undefined` | Maximum selectable date |
|
|
219
|
+
| `disabled` | `boolean` | `false` | Disable the picker |
|
|
220
|
+
| `className` | `string` | `""` | Additional CSS classes |
|
|
221
|
+
|
|
222
|
+
### TimePicker Props
|
|
223
|
+
|
|
224
|
+
| Prop | Type | Default | Description |
|
|
225
|
+
|------|------|---------|-------------|
|
|
226
|
+
| `value` | `string \| null` | `undefined` | Selected time (HH:MM) |
|
|
227
|
+
| `onChange` | `(time: string \| null) => void` | `undefined` | Called when time changes |
|
|
228
|
+
| `placeholder` | `string` | `"Select time..."` | Placeholder text |
|
|
229
|
+
| `disabled` | `boolean` | `false` | Disable the picker |
|
|
230
|
+
| `className` | `string` | `""` | Additional CSS classes |
|
|
231
|
+
| `format` | `"24h" \| "12h"` | `"24h"` | Time format (currently 24h) |
|
|
232
|
+
| `language` | `Language` | `"en"` | Language selection |
|
|
233
|
+
|
|
234
|
+
## 🎨 Customization
|
|
235
|
+
|
|
236
|
+
Components are highly customizable through props, themes, and CSS.
|
|
206
237
|
|
|
207
238
|
### Dark Mode
|
|
208
239
|
|
|
209
|
-
Dark mode
|
|
240
|
+
Dark mode is automatically set based on system preference or can be controlled manually using the `DarkModeToggle` component. All components support dark mode.
|
|
210
241
|
|
|
211
|
-
|
|
242
|
+
**Important:** You need to add the `dark` class to the HTML element for dark mode:
|
|
212
243
|
|
|
213
244
|
```tsx
|
|
214
245
|
import { DarkModeToggle } from 'react-datepicker-bkrdmrcioglu';
|
|
@@ -218,19 +249,19 @@ function MyComponent() {
|
|
|
218
249
|
}
|
|
219
250
|
```
|
|
220
251
|
|
|
221
|
-
|
|
252
|
+
To manually control dark mode:
|
|
222
253
|
|
|
223
254
|
```tsx
|
|
224
|
-
//
|
|
255
|
+
// Enable dark mode
|
|
225
256
|
document.documentElement.classList.add('dark');
|
|
226
257
|
|
|
227
|
-
//
|
|
258
|
+
// Disable dark mode
|
|
228
259
|
document.documentElement.classList.remove('dark');
|
|
229
260
|
```
|
|
230
261
|
|
|
231
|
-
###
|
|
262
|
+
### Language Selector
|
|
232
263
|
|
|
233
|
-
|
|
264
|
+
You can use the `LanguageSelector` component for language selection:
|
|
234
265
|
|
|
235
266
|
```tsx
|
|
236
267
|
import { LanguageSelector, DatePicker } from 'react-datepicker-bkrdmrcioglu';
|
|
@@ -249,18 +280,87 @@ function MyComponent() {
|
|
|
249
280
|
}
|
|
250
281
|
```
|
|
251
282
|
|
|
252
|
-
|
|
283
|
+
### Theme System
|
|
284
|
+
|
|
285
|
+
Customize the appearance of DatePicker components using the built-in theme system:
|
|
286
|
+
|
|
287
|
+
```tsx
|
|
288
|
+
import { ThemeProvider, DatePicker } from 'react-datepicker-bkrdmrcioglu';
|
|
289
|
+
|
|
290
|
+
function App() {
|
|
291
|
+
return (
|
|
292
|
+
<ThemeProvider defaultTheme="material">
|
|
293
|
+
<DatePicker value={date} onChange={setDate} />
|
|
294
|
+
</ThemeProvider>
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
#### Available Themes
|
|
300
|
+
|
|
301
|
+
- `default` - Clean and modern design
|
|
302
|
+
- `material` - Google Material Design inspired
|
|
303
|
+
- `minimal` - Simple and clean
|
|
304
|
+
- `glassmorphism` - Modern glass effect
|
|
305
|
+
|
|
306
|
+
#### Custom Theme
|
|
307
|
+
|
|
308
|
+
```tsx
|
|
309
|
+
import { ThemeProvider } from 'react-datepicker-bkrdmrcioglu';
|
|
310
|
+
import type { Theme } from 'react-datepicker-bkrdmrcioglu';
|
|
311
|
+
|
|
312
|
+
const customTheme: Theme = {
|
|
313
|
+
name: 'Custom',
|
|
314
|
+
colors: {
|
|
315
|
+
primary: '#8b5cf6',
|
|
316
|
+
background: '#ffffff',
|
|
317
|
+
// ... other colors
|
|
318
|
+
},
|
|
319
|
+
// ... other theme properties
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
function App() {
|
|
323
|
+
return (
|
|
324
|
+
<ThemeProvider defaultTheme={customTheme}>
|
|
325
|
+
<DatePicker />
|
|
326
|
+
</ThemeProvider>
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
## 📚 Documentation
|
|
332
|
+
|
|
333
|
+
- **Live Demo**: [https://react-datepicker-mu.vercel.app](https://react-datepicker-mu.vercel.app)
|
|
334
|
+
- **API Reference**: `/docs/api` - Complete API documentation
|
|
335
|
+
- **Theme Playground**: `/docs/themes` - Interactive theme customization
|
|
336
|
+
- **Storybook**: Run `npm run storybook` for interactive component showcase
|
|
337
|
+
|
|
338
|
+
## 🧪 Testing
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
# Run tests
|
|
342
|
+
npm test
|
|
343
|
+
|
|
344
|
+
# Run tests in watch mode
|
|
345
|
+
npm run test:watch
|
|
346
|
+
|
|
347
|
+
# Generate coverage report
|
|
348
|
+
npm run test:coverage
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
## 📝 License
|
|
352
|
+
|
|
253
353
|
|
|
254
|
-
MIT License -
|
|
354
|
+
MIT License - Feel free to use it.
|
|
255
355
|
|
|
256
|
-
## 🤝
|
|
356
|
+
## 🤝 Contributing
|
|
257
357
|
|
|
258
|
-
|
|
358
|
+
We welcome your contributions! Please open an issue or submit a pull request.
|
|
259
359
|
|
|
260
|
-
## 📧
|
|
360
|
+
## 📧 Contact
|
|
261
361
|
|
|
262
|
-
|
|
362
|
+
You can use GitHub Issues for your questions.
|
|
263
363
|
|
|
264
364
|
---
|
|
265
365
|
|
|
266
|
-
⭐
|
|
366
|
+
⭐ If you liked this project, don't forget to give it a star!
|
|
@@ -4,14 +4,25 @@ import { useEffect, useState } from 'react';
|
|
|
4
4
|
|
|
5
5
|
export default function DarkModeToggle() {
|
|
6
6
|
const [isDark, setIsDark] = useState(false);
|
|
7
|
+
const [mounted, setMounted] = useState(false);
|
|
7
8
|
|
|
8
9
|
useEffect(() => {
|
|
10
|
+
setMounted(true);
|
|
9
11
|
// Check initial theme
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
setIsDark(darkMode);
|
|
12
|
+
const stored = localStorage.getItem('darkMode');
|
|
13
|
+
let initialDark = false;
|
|
13
14
|
|
|
14
|
-
if (
|
|
15
|
+
if (stored !== null) {
|
|
16
|
+
initialDark = stored === 'true';
|
|
17
|
+
} else {
|
|
18
|
+
// Check system preference
|
|
19
|
+
initialDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
setIsDark(initialDark);
|
|
23
|
+
|
|
24
|
+
// Apply dark mode immediately
|
|
25
|
+
if (initialDark) {
|
|
15
26
|
document.documentElement.classList.add('dark');
|
|
16
27
|
} else {
|
|
17
28
|
document.documentElement.classList.remove('dark');
|
|
@@ -23,26 +34,45 @@ export default function DarkModeToggle() {
|
|
|
23
34
|
setIsDark(newDarkMode);
|
|
24
35
|
localStorage.setItem('darkMode', String(newDarkMode));
|
|
25
36
|
|
|
37
|
+
// Apply immediately to html element
|
|
38
|
+
const html = document.documentElement;
|
|
26
39
|
if (newDarkMode) {
|
|
27
|
-
|
|
40
|
+
html.classList.add('dark');
|
|
41
|
+
html.classList.remove('light');
|
|
28
42
|
} else {
|
|
29
|
-
|
|
43
|
+
html.classList.remove('dark');
|
|
44
|
+
html.classList.add('light');
|
|
30
45
|
}
|
|
31
46
|
};
|
|
32
47
|
|
|
48
|
+
if (!mounted) {
|
|
49
|
+
return (
|
|
50
|
+
<button
|
|
51
|
+
className="p-2 rounded-lg text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors"
|
|
52
|
+
aria-label="Toggle dark mode"
|
|
53
|
+
type="button"
|
|
54
|
+
disabled
|
|
55
|
+
>
|
|
56
|
+
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
57
|
+
<path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" />
|
|
58
|
+
</svg>
|
|
59
|
+
</button>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
33
63
|
return (
|
|
34
64
|
<button
|
|
35
65
|
onClick={toggleDarkMode}
|
|
36
|
-
className="
|
|
66
|
+
className="p-2 rounded-lg text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition-colors"
|
|
37
67
|
aria-label="Toggle dark mode"
|
|
38
68
|
type="button"
|
|
39
69
|
>
|
|
40
70
|
{isDark ? (
|
|
41
|
-
<svg className="w-5 h-5
|
|
71
|
+
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
42
72
|
<path fillRule="evenodd" d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z" clipRule="evenodd" />
|
|
43
73
|
</svg>
|
|
44
74
|
) : (
|
|
45
|
-
<svg className="w-5 h-5
|
|
75
|
+
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
|
|
46
76
|
<path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" />
|
|
47
77
|
</svg>
|
|
48
78
|
)}
|