react-timezone-select
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -21,3 +21,2 @@ import * as react_jsx_runtime_js from 'react/jsx-runtime.js'; | ||
timezones?: ICustomTimezone; | ||
maxAbbrLength?: number; | ||
}; | ||
@@ -24,0 +23,0 @@ type Props = Omit<Props$1<ITimezone, false>, 'onChange'> & TimezoneSelectOptions & { |
{ | ||
"name": "react-timezone-select", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Usable, dynamic React Timezone Select", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -21,8 +21,7 @@ # 🌐⌚ react-timezone-select | ||
We also have some **more examples** available on Codesandbox using this component with the datetime library `spacetime` ([example](https://codesandbox.io/s/react-timezone-select-usage-z37hf)) as well as with `moment` ([example](https://codesandbox.io/s/react-timezone-select-usage-moment-5n6vn)), as well as in Typescript using the new `Intl` browser API ([example](https://codesandbox.io/s/react-timezone-select-typescript-8lsv3?file=/src/App.tsx)) showing how one might use this component in a real application. | ||
## 🏗️ Installing | ||
```bash | ||
npm install react-select react-timezone-select | ||
// react-select is an optional peer dependency, unnecessary if using the hook | ||
npm install react-timezone-select react-select | ||
``` | ||
@@ -35,6 +34,6 @@ | ||
import ReactDOM from 'react-dom' | ||
import TimezoneSelect from 'react-timezone-select' | ||
import TimezoneSelect, { type ITimezone } from 'react-timezone-select' | ||
const App = () => { | ||
const [selectedTimezone, setSelectedTimezone] =useState( | ||
const [selectedTimezone, setSelectedTimezone] = useState<ITimezone>( | ||
Intl.DateTimeFormat().resolvedOptions().timeZone | ||
@@ -102,3 +101,6 @@ ) | ||
```jsx | ||
import TimezoneSelect, { allTimezones } from 'react-timezone-select' | ||
import TimezoneSelect, { type ITimezone, allTimezones } from 'react-timezone-select' | ||
const [selectedTimezone, setSelectedTimezone] = useState<ITimezone>('Europe/Berlin') | ||
<TimezoneSelect | ||
@@ -105,0 +107,0 @@ value={selectedTimezone} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179
30791
557