-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
121c4b5
commit 0505212
Showing
9 changed files
with
170 additions
and
37 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react'; | ||
import {Pressable, useColorScheme, View} from 'react-native'; | ||
|
||
import DownSquare from '@icons/downSquare.svg'; | ||
import clsx from 'clsx'; | ||
|
||
import {FrigateEvent} from '@api'; | ||
import {BaseText, Label} from '@components'; | ||
import {getFgColorHex} from '@utils'; | ||
|
||
export const SectionDateHeader = ({ | ||
section, | ||
handleHeaderPress, | ||
isCollapsed, | ||
}: { | ||
section: { | ||
title: string; | ||
data: FrigateEvent[]; | ||
}; | ||
handleHeaderPress: (s: string) => void; | ||
isCollapsed: boolean; | ||
}) => { | ||
const isDarkMode = useColorScheme() === 'dark'; | ||
return ( | ||
<Pressable onPress={() => handleHeaderPress(section.title)}> | ||
<Label | ||
className={clsx('px-4 py-2 rounded-t-none', isCollapsed && 'mb-1')}> | ||
<View className="flex-row items-center justify-between"> | ||
<BaseText className="font-semibold">{section.title}</BaseText> | ||
<DownSquare | ||
fill={getFgColorHex(isDarkMode)} | ||
height={28} | ||
width={28} | ||
style={isCollapsed && {transform: [{rotate: '180deg'}]}} | ||
/> | ||
</View> | ||
</Label> | ||
</Pressable> | ||
); | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters