From 2d9b81651c3880b65ec2d83afa128513365259f4 Mon Sep 17 00:00:00 2001 From: Lei Nelissen Date: Mon, 29 Jan 2024 00:14:10 +0100 Subject: [PATCH] fix: unnecessary changes --- src/components/ListButton.tsx | 22 ++-------------------- src/components/Modal.tsx | 5 ++--- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/src/components/ListButton.tsx b/src/components/ListButton.tsx index 32155c9e..5abfc19e 100644 --- a/src/components/ListButton.tsx +++ b/src/components/ListButton.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useState } from 'react'; -import { StyleSheet, TouchableOpacityProps } from 'react-native'; +import { TouchableOpacityProps } from 'react-native'; import ChevronRight from '@/assets/icons/chevron-right.svg'; import styled from 'styled-components/native'; import { THEME_COLOR } from '@/CONSTANTS'; @@ -19,28 +19,10 @@ const Container = styled.Pressable<{ active?: boolean }>` const Label = styled.Text<{ active?: boolean }>` color: ${THEME_COLOR}; font-size: 16px; - display: flex; `; -function useListButtonStyles() { - const styles = useDefaultStyles(); - return StyleSheet.create({ - ...styles, - descriptionNote: { - display: 'flex', - flexDirection: 'column' - }, - showDescription: { - display: 'flex' - }, - hideDescription: { - display: 'none' - } - }); -} - const ListButton: React.FC = ({ children, ...props }) => { - const defaultStyles = useListButtonStyles(); + const defaultStyles = useDefaultStyles(); const [isPressed, setPressed] = useState(false); const handlePressIn = useCallback(() => setPressed(true), []); const handlePressOut = useCallback(() => setPressed(false), []); diff --git a/src/components/Modal.tsx b/src/components/Modal.tsx index db35c496..a5f023b3 100644 --- a/src/components/Modal.tsx +++ b/src/components/Modal.tsx @@ -1,10 +1,9 @@ -import React, { useCallback } from 'react'; +import React, { PropsWithChildren, useCallback } from 'react'; import styled, { css } from 'styled-components/native'; import { useNavigation, StackActions } from '@react-navigation/native'; import useDefaultStyles from './Colors'; -interface Props { - children?: any; +interface Props extends PropsWithChildren { fullSize?: boolean; }