mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Implemented new dark theme
This commit is contained in:
@ -11,13 +11,13 @@ export interface Props {
|
||||
// Used for Android mostly
|
||||
const HeaderCenter = React.memo(
|
||||
({ content, inverted = false }: Props) => {
|
||||
const { theme } = useTheme()
|
||||
const { colors } = useTheme()
|
||||
|
||||
return (
|
||||
<Text
|
||||
style={[
|
||||
styles.text,
|
||||
{ color: inverted ? theme.primaryOverlay : theme.primaryDefault }
|
||||
{ color: inverted ? colors.primaryOverlay : colors.primaryDefault }
|
||||
]}
|
||||
children={content}
|
||||
/>
|
||||
|
@ -20,14 +20,14 @@ const HeaderLeft: React.FC<Props> = ({
|
||||
background = false,
|
||||
onPress
|
||||
}) => {
|
||||
const { theme } = useTheme()
|
||||
const { colors, theme } = useTheme()
|
||||
|
||||
const children = useMemo(() => {
|
||||
switch (type) {
|
||||
case 'icon':
|
||||
return (
|
||||
<Icon
|
||||
color={theme.primaryDefault}
|
||||
color={colors.primaryDefault}
|
||||
name={content || 'ChevronLeft'}
|
||||
size={StyleConstants.Spacing.M * 1.25}
|
||||
/>
|
||||
@ -35,7 +35,7 @@ const HeaderLeft: React.FC<Props> = ({
|
||||
case 'text':
|
||||
return (
|
||||
<Text
|
||||
style={[styles.text, { color: theme.primaryDefault }]}
|
||||
style={[styles.text, { color: colors.primaryDefault }]}
|
||||
children={content}
|
||||
/>
|
||||
)
|
||||
@ -50,7 +50,7 @@ const HeaderLeft: React.FC<Props> = ({
|
||||
styles.base,
|
||||
{
|
||||
backgroundColor: background
|
||||
? theme.backgroundOverlayDefault
|
||||
? colors.backgroundOverlayDefault
|
||||
: undefined,
|
||||
minHeight: 44,
|
||||
minWidth: 44,
|
||||
|
@ -41,14 +41,14 @@ const HeaderRight: React.FC<Props> = ({
|
||||
disabled,
|
||||
onPress
|
||||
}) => {
|
||||
const { theme } = useTheme()
|
||||
const { colors, theme } = useTheme()
|
||||
|
||||
const loadingSpinkit = useMemo(
|
||||
() => (
|
||||
<View style={{ position: 'absolute' }}>
|
||||
<Flow
|
||||
size={StyleConstants.Font.Size.M * 1.25}
|
||||
color={theme.secondary}
|
||||
color={colors.secondary}
|
||||
/>
|
||||
</View>
|
||||
),
|
||||
@ -64,7 +64,7 @@ const HeaderRight: React.FC<Props> = ({
|
||||
name={content}
|
||||
style={{ opacity: loading ? 0 : 1 }}
|
||||
size={StyleConstants.Spacing.M * 1.25}
|
||||
color={disabled ? theme.secondary : theme.primaryDefault}
|
||||
color={disabled ? colors.secondary : colors.primaryDefault}
|
||||
/>
|
||||
{loading && loadingSpinkit}
|
||||
</>
|
||||
@ -76,7 +76,7 @@ const HeaderRight: React.FC<Props> = ({
|
||||
style={[
|
||||
styles.text,
|
||||
{
|
||||
color: disabled ? theme.secondary : theme.primaryDefault,
|
||||
color: disabled ? colors.secondary : colors.primaryDefault,
|
||||
opacity: loading ? 0 : 1
|
||||
}
|
||||
]}
|
||||
@ -101,7 +101,7 @@ const HeaderRight: React.FC<Props> = ({
|
||||
styles.base,
|
||||
{
|
||||
backgroundColor: background
|
||||
? theme.backgroundOverlayDefault
|
||||
? colors.backgroundOverlayDefault
|
||||
: undefined,
|
||||
minHeight: 44,
|
||||
minWidth: 44,
|
||||
|
Reference in New Issue
Block a user