Skip to content

Commit 414ca51

Browse files
authored
fix: Export to EPUB Improvements (#670)
* Test config * update react-native-epub-creator * updated deps * option for export to epub * added prettier to dev deps since I couldn't push * removed white background when pulling up bottomsheet * added options to the export to epub feature * support for customCSS -JS and inchapter images * package update * fixed weird typing * fixed weird KeyboardAvoidingView * remove test config * logic fix * removed styles2 * fixed package problems * fixed package problems * notification icons * package reinstallation * package reinstallation * customFileModal fix * fixed ChapterItem alignment * added github suggestions
1 parent 0d4e165 commit 414ca51

File tree

20 files changed

+2410
-16088
lines changed

20 files changed

+2410
-16088
lines changed
Loading
Loading
Loading
Loading
Loading

package-lock.json

Lines changed: 2156 additions & 15914 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"prepare": "husky install"
1717
},
1818
"dependencies": {
19-
"@cd-z/react-native-epub-creator": "^2.0.0",
19+
"@cd-z/react-native-epub-creator": "^2.0.4",
2020
"@gorhom/bottom-sheet": "^4.4.5",
2121
"@react-native-async-storage/async-storage": "^1.18.1",
2222
"@react-native-community/clipboard": "^1.5.1",
@@ -91,10 +91,11 @@
9191
"@typescript-eslint/eslint-plugin": "^5.57.1",
9292
"@typescript-eslint/parser": "^5.57.1",
9393
"babel-plugin-module-resolver": "^4.1.0",
94-
"eslint": "^7.32.0",
95-
"eslint-plugin-react-native": "^3.11.0",
94+
"eslint": "^8.0.0",
95+
"eslint-plugin-react-native": "^4.0.0",
9696
"husky": "^7.0.4",
9797
"lint-staged": "^12.3.7",
98+
"prettier": "^2.8.8",
9899
"typescript": "^4.6.3"
99100
},
100101
"resolutions": {

src/components/BottomSheet/BottomSheet.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ import {
66
BottomSheetModalProps,
77
} from '@gorhom/bottom-sheet';
88
import { useSafeAreaInsets } from 'react-native-safe-area-context';
9+
import { useTheme } from '@hooks/useTheme';
10+
import { overlay } from 'react-native-paper';
911

1012
interface BottomSheetProps extends Omit<BottomSheetModalProps, 'ref'> {
1113
bottomSheetRef: Ref<BottomSheetModal> | null;
1214
}
1315

1416
const BottomSheet: React.FC<BottomSheetProps> = props => {
1517
const { bottom } = useSafeAreaInsets();
18+
const theme = useTheme();
1619

1720
const renderBackdrop = useCallback(
1821
(backdropProps: BottomSheetBackdropProps) => (
@@ -31,6 +34,7 @@ const BottomSheet: React.FC<BottomSheetProps> = props => {
3134
backdropComponent={renderBackdrop}
3235
handleComponent={null}
3336
containerStyle={{ paddingBottom: bottom }}
37+
backgroundStyle={{ backgroundColor: overlay(2, theme.surface) }}
3438
{...props}
3539
>
3640
{props.children}

src/components/Switch/Switch.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const SwitchSetting: React.FC<SwitchProps> = ({
2525
paddingHorizontal: 16,
2626
flexDirection: 'row',
2727
justifyContent: 'space-between',
28-
paddingVertical: description ? 16 : 12,
28+
paddingVertical: 12,
2929
},
3030
row: {
3131
flexDirection: 'row',
@@ -39,7 +39,6 @@ const SwitchSetting: React.FC<SwitchProps> = ({
3939
},
4040
text: {
4141
fontSize: 16,
42-
flex: 1,
4342
textAlignVertical: 'center',
4443
},
4544
switch: { marginLeft: 8 },

src/hooks/useBoolean.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { Dispatch, SetStateAction, useCallback, useState } from 'react';
22

3-
interface ReturnType {
3+
export interface BooleanHookType {
44
value: boolean;
55
setValue: Dispatch<SetStateAction<boolean>>;
66
setTrue: () => void;
77
setFalse: () => void;
88
toggle: () => void;
99
}
1010

11-
const useBoolean = (defaultValue?: boolean): ReturnType => {
11+
const useBoolean = (defaultValue?: boolean): BooleanHookType => {
1212
const [value, setValue] = useState(!!defaultValue);
1313

1414
const setTrue = useCallback(() => setValue(true), []);

0 commit comments

Comments
 (0)