Skip to content

Commit

Permalink
destructure props in CollapsibleSection
Browse files Browse the repository at this point in the history
  • Loading branch information
JKobrynski committed Nov 9, 2023
1 parent 97fde1b commit e2d0ba1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/CollapsibleSection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type CollapsibleSectionProps = ChildrenProps & {
title: string;
};

function CollapsibleSection(props: CollapsibleSectionProps) {
function CollapsibleSection({title, children}: CollapsibleSectionProps) {
const [isExpanded, setIsExpanded] = useState(false);

/**
Expand All @@ -32,21 +32,21 @@ function CollapsibleSection(props: CollapsibleSectionProps) {
onPress={toggleSection}
style={[styles.pb4, styles.flexRow]}
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
accessibilityLabel={props.title}
accessibilityLabel={title}
hoverDimmingValue={1}
pressDimmingValue={0.2}
>
<Text
style={[styles.flex1, styles.textStrong, styles.userSelectNone]}
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}}
>
{props.title}
{title}
</Text>
<Icon src={src} />
</PressableWithFeedback>
<View style={styles.collapsibleSectionBorder} />
<Collapsible isOpened={isExpanded}>
<View>{props.children}</View>
<View>{children}</View>
</Collapsible>
</View>
);
Expand Down

0 comments on commit e2d0ba1

Please sign in to comment.