Add kawaii mode (#3773)

This commit is contained in:
Samuel Newman 2024-05-01 08:59:40 +01:00 committed by GitHub
parent 181e61bedb
commit 81ae7e425d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 152 additions and 30 deletions

View file

@ -1,15 +1,17 @@
import React from 'react'
import {StyleSheet, TextProps} from 'react-native'
import Svg, {
Path,
Defs,
LinearGradient,
Path,
PathProps,
Stop,
SvgProps,
PathProps,
} from 'react-native-svg'
import {Image} from 'expo-image'
import {colors} from '#/lib/styles'
import {useKawaiiMode} from '#/state/preferences/kawaii'
const ratio = 57 / 64
@ -25,6 +27,25 @@ export const Logo = React.forwardRef(function LogoImpl(props: Props, ref) {
const _fill = gradient ? 'url(#sky)' : fill || styles?.color || colors.blue3
// @ts-ignore it's fiiiiine
const size = parseInt(rest.width || 32)
const isKawaii = useKawaiiMode()
if (isKawaii) {
return (
<Image
source={
size > 100
? require('../../../assets/kawaii.png')
: require('../../../assets/kawaii_smol.png')
}
accessibilityLabel="Bluesky"
accessibilityHint=""
accessibilityIgnoresInvertColors
style={[{height: size, aspectRatio: 1.4}]}
/>
)
}
return (
<Svg
fill="none"