fix: unnecessary changes

This commit is contained in:
Lei Nelissen
2024-01-29 00:14:10 +01:00
parent 3bcd7496c2
commit 2d9b81651c
2 changed files with 4 additions and 23 deletions

View File

@@ -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<TouchableOpacityProps> = ({ children, ...props }) => {
const defaultStyles = useListButtonStyles();
const defaultStyles = useDefaultStyles();
const [isPressed, setPressed] = useState(false);
const handlePressIn = useCallback(() => setPressed(true), []);
const handlePressOut = useCallback(() => setPressed(false), []);

View File

@@ -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;
}