Skip to content

Commit

Permalink
fix: unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
leinelissen committed Jan 28, 2024
1 parent 3bcd749 commit 2d9b816
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
22 changes: 2 additions & 20 deletions src/components/ListButton.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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), []);
Expand Down
5 changes: 2 additions & 3 deletions src/components/Modal.tsx
Original file line number Diff line number Diff line change
@@ -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;
}

Expand Down

0 comments on commit 2d9b816

Please sign in to comment.