vd-plugins/nexxstuff/components/SliderIcon.tsx
kmmiio99o b98ce51645
feat: add nexx lib and better Header text
nexx shouldn't be mad, right?
2026-01-25 17:09:24 +01:00

50 lines
1 KiB
TypeScript

import { ReactNative as RN, stylesheet } from "@vendetta/metro/common";
import { semanticColors } from "@vendetta/ui";
import { getAssetIDByName } from "@vendetta/ui/assets";
export default function SliderIcon({
side,
onPress,
}: {
side: "start" | "end";
onPress: () => void;
}) {
const styles = stylesheet.createThemedStyleSheet({
androidRipple: {
color: semanticColors.ANDROID_RIPPLE,
},
iconSecondary: {
width: 24,
height: 24,
tintColor: "transparent",
},
icon: {
width: 24,
height: 24,
tintColor: semanticColors.INTERACTIVE_ICON_DEFAULT,
position: "absolute",
top: 0,
},
});
const icon = side === "start" ? "CircleMinusIcon" : "CirclePlusIcon";
return (
<RN.Pressable
android_ripple={styles.androidRipple}
accessible={false}
onPress={onPress}
>
<RN.View>
<RN.Image
style={styles.iconSecondary}
source={getAssetIDByName(`${icon}-secondary`)}
/>
<RN.Image
style={styles.icon}
source={getAssetIDByName(`${icon}-primary`)}
/>
</RN.View>
</RN.Pressable>
);
}