feat: fixes and formatter

This commit is contained in:
2026-01-12 16:01:32 +01:00
parent 85c6084351
commit 11e632acff
353 changed files with 23315 additions and 27361 deletions
+15 -15
View File
@@ -1,28 +1,28 @@
import { Motion } from "@legendapp/motion";
import { Pressable, View } from "react-native";
import { Easing } from "react-native-reanimated";
import { Motion } from '@legendapp/motion'
import { Pressable, View } from 'react-native'
import { Easing } from 'react-native-reanimated'
import { Palette } from "../styles";
import { LinearGradient } from "./LinearGradient/LinearGradient";
import { Palette } from '../styles'
import { LinearGradient } from './LinearGradient/LinearGradient'
export default ({ value, setValue, containerStyle = {} }) => {
const currentColor = value ? ["#F94697", "#7023F7"] : ["#8C8C8C", "#8C8C8C"];
const currentColor = value ? ['#F94697', '#7023F7'] : ['#8C8C8C', '#8C8C8C']
const switchHeight = 28;
const internalMargin = 2;
const switchHeight = 28
const internalMargin = 2
const itemSize = switchHeight - internalMargin * 2;
const itemSize = switchHeight - internalMargin * 2
return (
<Pressable onPress={() => setValue(!value)}>
<LinearGradient
colors={currentColor}
style={{
flexDirection: "row",
flexDirection: 'row',
width: switchHeight * 2,
height: switchHeight,
borderRadius: 25,
backgroundColor: "red",
backgroundColor: 'red',
...containerStyle,
}}
>
@@ -32,12 +32,12 @@ export default ({ value, setValue, containerStyle = {} }) => {
left: value ? switchHeight : 0,
}}
transition={{
type: "timing",
type: 'timing',
duration: 300,
easing: Easing.easing,
}}
style={{
position: "absolute",
position: 'absolute',
width: itemSize,
height: itemSize,
margin: internalMargin,
@@ -47,5 +47,5 @@ export default ({ value, setValue, containerStyle = {} }) => {
/>
</LinearGradient>
</Pressable>
);
};
)
}