eletrotupi / tcc/ commit / 7fee969

frontend: drop the unsupported icon weight in Collapsible

Pedro Lucas Porcellis porcellis@eletrotupi.com · 12 days ago 7fee969bd7c3a184aabf448e27667c76b4e49617 Browse files
Parents 2f22c81
Changed files
1
Additions
0
Deletions
-3
frontend/components/ui/collapsible.tsx
1 1
import { PropsWithChildren, useState } from 'react';
2 2
import { StyleSheet, TouchableOpacity } from 'react-native';
3 3

4 4
import { Text } from '@/components/ui/Text';
5 5
import { ThemedView } from '@/components/misc/themed-view';
6 6
import { IconSymbol } from '@/components/ui/icon-symbol';
7 7
import { Colors } from '@/constants/theme';
8 -
import { useColorScheme } from '@/hooks/use-color-scheme';
9 8

10 9
export function Collapsible({ children, title }: PropsWithChildren & { title: string }) {
11 10
  const [isOpen, setIsOpen] = useState(false);
12 -
  const theme = useColorScheme() ?? 'light';
13 11

14 12
  return (
15 13
    <ThemedView>
16 14
      <TouchableOpacity
17 15
        style={styles.heading}
18 16
        onPress={() => setIsOpen((value) => !value)}
19 17
        activeOpacity={0.8}>
20 18
        <IconSymbol
21 19
          name="chevron.right"
22 20
          size={18}
23 -
          weight="medium"
24 21
          color={Colors.light.icon}
25 22
          style={{ transform: [{ rotate: isOpen ? '90deg' : '0deg' }] }}
26 23
        />
27 24

28 25
        <Text style={{ fontWeight: '600' }}>{title}</Text>
41 38
  content: {
42 39
    marginTop: 6,
43 40
    marginLeft: 24,
44 41
  },
45 42
});