Skip to content

Commit

Permalink
Merge pull request #9 from troberts-28/patch-v1.2.1
Browse files Browse the repository at this point in the history
Patch v1.2.1
  • Loading branch information
troberts-28 authored Aug 22, 2023
2 parents 495b11b + 74b8605 commit 85fc593
Show file tree
Hide file tree
Showing 9 changed files with 528 additions and 348 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,28 +377,32 @@ The following custom styles can be supplied to re-style the component in any way

## Methods 🔄

### TimerPickerModal
### TimerPicker

The library exposes a TimerPickerModalRef type, which can be used to type your ref to the modal:
The library exposes a TimerPickerRef type, which can be used to type your ref to the picker:

```javascript
const timerPickerModalRef = useRef<TimerPickerModalRef>(null);
const timerPickerRef = useRef<TimerPickerRef>(null);
```

It has the following available methods:

`reset` - imperative method to reset the selected duration to their initial values.

```javascript
timerPickerModalRef.current.reset();
timerPickerRef.current.reset(options?: { animated: boolean });
```

`setValue` - imperative method to set the selected duration to a particular value

```javascript
timerPickerModalRef.current.setValue({hours: number, minutes: number, seconds: number});
timerPickerRef.current.setValue({ hours: number, minutes: number, seconds: number }, options?: { animated: boolean });
```

### TimerPickerModal

An identical ref is also exposed for the TimerPickerModal component.

## License 📝

This project is licensed under the [MIT License](LICENSE).
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"web": "npx expo start --web"
},
"dependencies": {
"expo": "^49.0.7",
"expo": "^49.0.8",
"expo-linear-gradient": ">=12.0.1",
"react": ">=18.1.0",
"react-native": ">=0.70.8"
Expand Down
85 changes: 65 additions & 20 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2490,10 +2490,10 @@ babel-plugin-transform-flow-enums@^0.0.2:
dependencies:
"@babel/plugin-syntax-flow" "^7.12.1"

babel-preset-expo@~9.5.1:
version "9.5.1"
resolved "https://registry.yarnpkg.com/babel-preset-expo/-/babel-preset-expo-9.5.1.tgz#5ceab896ac5ac29f32dfaf5a653e93965bbc0de1"
integrity sha512-dOLhi5C1hNOAMFYjRlsP1axswMSf9MxX7zsez9kmwrm46cyev2l2ThQ8VdDig/YdwhNScd7sQ/lovrOTObk4Hg==
babel-preset-expo@~9.5.2:
version "9.5.2"
resolved "https://registry.yarnpkg.com/babel-preset-expo/-/babel-preset-expo-9.5.2.tgz#5ed1756c8434ca972d7a940e4f13570a283641df"
integrity sha512-hU1G1TDiikuXV6UDZjPnX+WdbjbtidDiYhftMEVrZQSst45pDPVBWbM41TUKrpJMwv4FypsLzK+378gnMPRVWQ==
dependencies:
"@babel/plugin-proposal-decorators" "^7.12.9"
"@babel/plugin-proposal-export-namespace-from" "^7.18.9"
Expand All @@ -2502,7 +2502,7 @@ babel-preset-expo@~9.5.1:
"@babel/preset-env" "^7.20.0"
babel-plugin-module-resolver "^5.0.0"
babel-plugin-react-native-web "~0.18.10"
metro-react-native-babel-preset "0.76.7"
metro-react-native-babel-preset "0.76.8"

babel-preset-fbjs@^3.4.0:
version "3.4.0"
Expand Down Expand Up @@ -3608,10 +3608,10 @@ expo-linear-gradient@>=12.0.1:
resolved "https://registry.yarnpkg.com/expo-linear-gradient/-/expo-linear-gradient-12.3.0.tgz#7abd8fedbf0138c86805aebbdfbbf5e5fa865f19"
integrity sha512-f9e+Oxe5z7fNQarTBZXilMyswlkbYWQHONVfq8MqmiEnW3h9XsxxmVJLG8uVQSQPUsbW+x1UUT/tnU6mkMWeLg==

[email protected].0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/expo-modules-autolinking/-/expo-modules-autolinking-1.5.0.tgz#64d6ea4fd77ba2d578dd5c98af0a7630e30f2be3"
integrity sha512-i9zll5xNYh0/sjaa6hpZlTHodKEu2tMEFsJJYsfBMTt8G9J8gGhalOydrX/Ql1E8bQ4GxnLAqrM7duR0Tj2VTQ==
[email protected].1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/expo-modules-autolinking/-/expo-modules-autolinking-1.5.1.tgz#363f90c172769ce12bf56c7be9ca0897adfc7a81"
integrity sha512-yt5a1VCp2BF9CrsO689PCD5oXKP14MMhnOanQMvDn4BDpURYfzAlDVGC5fZrNQKtwn/eq3bcrxIwZ7D9QjVVRg==
dependencies:
"@expo/config" "~8.1.0"
chalk "^4.1.0"
Expand All @@ -3620,33 +3620,33 @@ [email protected]:
find-up "^5.0.0"
fs-extra "^9.1.0"

[email protected].9:
version "1.5.9"
resolved "https://registry.yarnpkg.com/expo-modules-core/-/expo-modules-core-1.5.9.tgz#d8bc397860cabb23f735f5baac3602bd73231671"
integrity sha512-kQxllZfus7wM0O6X0Ud+SOnbH/kbxtEAQp2gkvDq3P3kqhtafue/H9CPDX04uWc/pypvp9vp/sZ+qvA0alaVuQ==
[email protected].10:
version "1.5.10"
resolved "https://registry.yarnpkg.com/expo-modules-core/-/expo-modules-core-1.5.10.tgz#b829ef0c65208870555d604d4602bfe84d0e8bb7"
integrity sha512-+m+poHkhjAhRZmngSLUpJJoxhjoExYKSr4J5luy4N+YMlowK31Zewztg4xsPrNRoPvGK/B5uCm0UEzIQvLsNGg==
dependencies:
compare-versions "^3.4.0"
invariant "^2.2.4"

expo@^49.0.7:
version "49.0.7"
resolved "https://registry.yarnpkg.com/expo/-/expo-49.0.7.tgz#b8fdc9550757f2a848fd08d3e9e7382b74b29ac4"
integrity sha512-KGyZMuU83LNnWbfzdFrC45AhUDDAYKir7MawZJ7N8pBmHbLF8txlKq+KeZcwavD8fZREFYhSGJdTgfKPiXQymg==
expo@^49.0.8:
version "49.0.8"
resolved "https://registry.yarnpkg.com/expo/-/expo-49.0.8.tgz#97e2ffcf239326898a3b803394e069f7df7a381e"
integrity sha512-lkTRwMvJP8j7KAHJB+aZqI9dH1hw7j2QE1X9Okpcf+t0deGqH36XqkjUCcU6KYgCOjSnt8fvRm89TJR5Oq0ElA==
dependencies:
"@babel/runtime" "^7.20.0"
"@expo/cli" "0.10.11"
"@expo/config" "8.1.2"
"@expo/config-plugins" "7.2.5"
"@expo/vector-icons" "^13.0.0"
babel-preset-expo "~9.5.1"
babel-preset-expo "~9.5.2"
expo-application "~5.3.0"
expo-asset "~8.10.1"
expo-constants "~14.4.2"
expo-file-system "~15.4.3"
expo-font "~11.4.0"
expo-keep-awake "~12.3.0"
expo-modules-autolinking "1.5.0"
expo-modules-core "1.5.9"
expo-modules-autolinking "1.5.1"
expo-modules-core "1.5.10"
fbemitter "^3.0.0"
invariant "^2.2.4"
md5-file "^3.2.3"
Expand Down Expand Up @@ -5219,6 +5219,51 @@ [email protected]:
babel-plugin-transform-flow-enums "^0.0.2"
react-refresh "^0.4.0"

[email protected]:
version "0.76.8"
resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.76.8.tgz#7476efae14363cbdfeeec403b4f01d7348e6c048"
integrity sha512-Ptza08GgqzxEdK8apYsjTx2S8WDUlS2ilBlu9DR1CUcHmg4g3kOkFylZroogVAUKtpYQNYwAvdsjmrSdDNtiAg==
dependencies:
"@babel/core" "^7.20.0"
"@babel/plugin-proposal-async-generator-functions" "^7.0.0"
"@babel/plugin-proposal-class-properties" "^7.18.0"
"@babel/plugin-proposal-export-default-from" "^7.0.0"
"@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.0"
"@babel/plugin-proposal-numeric-separator" "^7.0.0"
"@babel/plugin-proposal-object-rest-spread" "^7.20.0"
"@babel/plugin-proposal-optional-catch-binding" "^7.0.0"
"@babel/plugin-proposal-optional-chaining" "^7.20.0"
"@babel/plugin-syntax-dynamic-import" "^7.8.0"
"@babel/plugin-syntax-export-default-from" "^7.0.0"
"@babel/plugin-syntax-flow" "^7.18.0"
"@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0"
"@babel/plugin-syntax-optional-chaining" "^7.0.0"
"@babel/plugin-transform-arrow-functions" "^7.0.0"
"@babel/plugin-transform-async-to-generator" "^7.20.0"
"@babel/plugin-transform-block-scoping" "^7.0.0"
"@babel/plugin-transform-classes" "^7.0.0"
"@babel/plugin-transform-computed-properties" "^7.0.0"
"@babel/plugin-transform-destructuring" "^7.20.0"
"@babel/plugin-transform-flow-strip-types" "^7.20.0"
"@babel/plugin-transform-function-name" "^7.0.0"
"@babel/plugin-transform-literals" "^7.0.0"
"@babel/plugin-transform-modules-commonjs" "^7.0.0"
"@babel/plugin-transform-named-capturing-groups-regex" "^7.0.0"
"@babel/plugin-transform-parameters" "^7.0.0"
"@babel/plugin-transform-react-display-name" "^7.0.0"
"@babel/plugin-transform-react-jsx" "^7.0.0"
"@babel/plugin-transform-react-jsx-self" "^7.0.0"
"@babel/plugin-transform-react-jsx-source" "^7.0.0"
"@babel/plugin-transform-runtime" "^7.0.0"
"@babel/plugin-transform-shorthand-properties" "^7.0.0"
"@babel/plugin-transform-spread" "^7.0.0"
"@babel/plugin-transform-sticky-regex" "^7.0.0"
"@babel/plugin-transform-typescript" "^7.5.0"
"@babel/plugin-transform-unicode-regex" "^7.0.0"
"@babel/template" "^7.0.0"
babel-plugin-transform-flow-enums "^0.0.2"
react-refresh "^0.4.0"

[email protected]:
version "0.76.7"
resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.76.7.tgz#ccc7c25b49ee8a1860aafdbf48bfa5441d206f8f"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://github.com/troberts-28"
},
"license": "MIT",
"version": "1.2.0",
"version": "1.2.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
Expand Down
Loading

0 comments on commit 85fc593

Please sign in to comment.