Skip to content

Commit 7f4aa57

Browse files
committed
Release 2.2.0
Resolve #49 #48
1 parent d4c98c1 commit 7f4aa57

File tree

5 files changed

+19
-17
lines changed

5 files changed

+19
-17
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ jobs:
2222
- name: Build typescript
2323
run: yarn build
2424

25-
- name: Remove dist (to test `tsx`)
26-
run: rm -rf ./lib
27-
2825
- name: Test
2926
run: yarn test --coverage
3027

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
[2.2.0]
2+
Fix typescript not being exposed during deploy. [#49](https://github.com/hyochan/react-native-switch-toggle/issues/49)
3+
4+
Fix transition `inputRange` start from `0` [#48](https://github.com/hyochan/react-native-switch-toggle/issues/48).
5+
16
[2.0.1]
27
Update readme.
38

__tests__/__snapshots__/SwitchToggle.test.tsx.snap

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ exports[`[SwitchToggle] Accessibility should render AccessibilityHint 1`] = `
4040
<View
4141
style={
4242
Object {
43-
"backgroundColor": "rgba(-37, -37, -37, 1)",
43+
"backgroundColor": "rgba(109, 109, 109, 1)",
4444
"transform": Array [
4545
Object {
4646
"translateX": 10,
@@ -113,7 +113,7 @@ exports[`[SwitchToggle] Accessibility should render AccessibilityLabel 1`] = `
113113
<View
114114
style={
115115
Object {
116-
"backgroundColor": "rgba(-37, -37, -37, 1)",
116+
"backgroundColor": "rgba(109, 109, 109, 1)",
117117
"transform": Array [
118118
Object {
119119
"translateX": 10,
@@ -186,7 +186,7 @@ exports[`[SwitchToggle] Accessibility should render AccessibilityRole 1`] = `
186186
<View
187187
style={
188188
Object {
189-
"backgroundColor": "rgba(-37, -37, -37, 1)",
189+
"backgroundColor": "rgba(109, 109, 109, 1)",
190190
"transform": Array [
191191
Object {
192192
"translateX": 10,
@@ -259,7 +259,7 @@ exports[`[SwitchToggle] Accessibility should render AccessibilityState 1`] = `
259259
<View
260260
style={
261261
Object {
262-
"backgroundColor": "rgba(-37, -37, -37, 1)",
262+
"backgroundColor": "rgba(109, 109, 109, 1)",
263263
"transform": Array [
264264
Object {
265265
"translateX": 10,
@@ -332,7 +332,7 @@ exports[`[SwitchToggle] Accessibility should render AccessibilityValue 1`] = `
332332
<View
333333
style={
334334
Object {
335-
"backgroundColor": "rgba(-37, -37, -37, 1)",
335+
"backgroundColor": "rgba(109, 109, 109, 1)",
336336
"transform": Array [
337337
Object {
338338
"translateX": 10,
@@ -402,7 +402,7 @@ exports[`[SwitchToggle] Rendering should render \`containerStyle\` and \`circleW
402402
<View
403403
style={
404404
Object {
405-
"backgroundColor": "rgba(-37, -37, -37, 1)",
405+
"backgroundColor": "rgba(109, 109, 109, 1)",
406406
"transform": Array [
407407
Object {
408408
"translateX": 80,
@@ -472,7 +472,7 @@ exports[`[SwitchToggle] Rendering should render \`containerStyle\` and \`circleW
472472
<View
473473
style={
474474
Object {
475-
"backgroundColor": "rgba(-37, -37, -37, 1)",
475+
"backgroundColor": "rgba(109, 109, 109, 1)",
476476
"transform": Array [
477477
Object {
478478
"translateX": "NaN[object Object]",
@@ -541,7 +541,7 @@ exports[`[SwitchToggle] Rendering should render \`containerStyle\` and \`contain
541541
<View
542542
style={
543543
Object {
544-
"backgroundColor": "rgba(-37, -37, -37, 1)",
544+
"backgroundColor": "rgba(109, 109, 109, 1)",
545545
"borderRadius": 16,
546546
"height": 32,
547547
"transform": Array [
@@ -616,7 +616,7 @@ exports[`[SwitchToggle] Rendering should render RTL 1`] = `
616616
<View
617617
style={
618618
Object {
619-
"backgroundColor": "rgba(-37, -37, -37, 1)",
619+
"backgroundColor": "rgba(109, 109, 109, 1)",
620620
"transform": Array [
621621
Object {
622622
"translateX": 10,
@@ -689,7 +689,7 @@ exports[`[SwitchToggle] Rendering should render type === 0 1`] = `
689689
<View
690690
style={
691691
Object {
692-
"backgroundColor": "rgba(-37, -37, -37, 1)",
692+
"backgroundColor": "rgba(109, 109, 109, 1)",
693693
"borderRadius": 16,
694694
"height": 32,
695695
"transform": Array [
@@ -764,7 +764,7 @@ exports[`[SwitchToggle] Rendering should render when \`containerStyle\` is not d
764764
<View
765765
style={
766766
Object {
767-
"backgroundColor": "rgba(-37, -37, -37, 1)",
767+
"backgroundColor": "rgba(109, 109, 109, 1)",
768768
"transform": Array [
769769
Object {
770770
"translateX": 10,
@@ -837,7 +837,7 @@ exports[`[SwitchToggle] Rendering should render without crashing 1`] = `
837837
<View
838838
style={
839839
Object {
840-
"backgroundColor": "rgba(-37, -37, -37, 1)",
840+
"backgroundColor": "rgba(109, 109, 109, 1)",
841841
"borderRadius": 16,
842842
"height": 32,
843843
"transform": Array [

index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function SwitchToggle(props: Props): React.ReactElement {
153153
props.circleStyle,
154154
{
155155
backgroundColor: animXValue.interpolate({
156-
inputRange: [0.5, 1],
156+
inputRange: [0, 1],
157157
outputRange: [
158158
circleColorOff as string | number,
159159
circleColorOn as string | number,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-switch-toggle",
3-
"version": "2.1.1",
3+
"version": "2.2.0",
44
"description": "Highly customizable animating react native switch toggle component.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

0 commit comments

Comments
 (0)