[add]: LinkBase && PopupCC, starting theme management (light and dark) and translation
This commit is contained in:
@@ -13,11 +13,41 @@ interface CheckboxProps {
|
||||
}
|
||||
|
||||
const CheckboxBase: React.FC<CheckboxProps> = ({ title, color, style, check, setCheck }) => {
|
||||
const theme = useTheme();
|
||||
const { colors } = useTheme();
|
||||
|
||||
return (
|
||||
<InteractiveBase
|
||||
style={[styles.container, style]}
|
||||
styleAnimate={styleGlassmorphism}
|
||||
styleAnimate={{
|
||||
Default: {
|
||||
scale: 1,
|
||||
shadowOpacity: 0.3,
|
||||
shadowRadius: 4.65,
|
||||
elevation: 8,
|
||||
backgroundColor: colors.coolGray[500],
|
||||
},
|
||||
onHover: {
|
||||
scale: 1.01,
|
||||
shadowOpacity: 0.37,
|
||||
shadowRadius: 7.49,
|
||||
elevation: 12,
|
||||
backgroundColor: colors.coolGray[400],
|
||||
},
|
||||
onPressed: {
|
||||
scale: 0.99,
|
||||
shadowOpacity: 0.23,
|
||||
shadowRadius: 2.62,
|
||||
elevation: 4,
|
||||
backgroundColor: colors.coolGray[600],
|
||||
},
|
||||
Disabled: {
|
||||
scale: 1,
|
||||
shadowOpacity: 0.3,
|
||||
shadowRadius: 4.65,
|
||||
elevation: 8,
|
||||
backgroundColor: colors.coolGray[500],
|
||||
},
|
||||
}}
|
||||
onPress={async () => {
|
||||
setCheck(!check);
|
||||
}}
|
||||
@@ -26,13 +56,13 @@ const CheckboxBase: React.FC<CheckboxProps> = ({ title, color, style, check, set
|
||||
{check ? (
|
||||
<TickSquare
|
||||
size="24"
|
||||
color={color ? color : theme.colors.primary[400]}
|
||||
color={color ?? colors.primary[400]}
|
||||
variant="Bold"
|
||||
/>
|
||||
) : (
|
||||
<AddSquare
|
||||
size="24"
|
||||
color={color ? color : theme.colors.primary[400]}
|
||||
color={color ?? colors.primary[400]}
|
||||
variant="Outline"
|
||||
/>
|
||||
)}
|
||||
@@ -44,37 +74,6 @@ const CheckboxBase: React.FC<CheckboxProps> = ({ title, color, style, check, set
|
||||
);
|
||||
};
|
||||
|
||||
const styleGlassmorphism = StyleSheet.create({
|
||||
Default: {
|
||||
scale: 1,
|
||||
shadowOpacity: 0.3,
|
||||
shadowRadius: 4.65,
|
||||
elevation: 8,
|
||||
backgroundColor: 'rgba(16,16,20,0.5)',
|
||||
},
|
||||
onHover: {
|
||||
scale: 1.01,
|
||||
shadowOpacity: 0.37,
|
||||
shadowRadius: 7.49,
|
||||
elevation: 12,
|
||||
backgroundColor: 'rgba(16,16,20,0.4)',
|
||||
},
|
||||
onPressed: {
|
||||
scale: 0.99,
|
||||
shadowOpacity: 0.23,
|
||||
shadowRadius: 2.62,
|
||||
elevation: 4,
|
||||
backgroundColor: 'rgba(16,16,20,0.6)',
|
||||
},
|
||||
Disabled: {
|
||||
scale: 1,
|
||||
shadowOpacity: 0.3,
|
||||
shadowRadius: 4.65,
|
||||
elevation: 8,
|
||||
backgroundColor: 'rgba(16,16,20,0.5)',
|
||||
},
|
||||
});
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
borderRadius: 8,
|
||||
|
||||
Reference in New Issue
Block a user