mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2025-06-28 16:25:46 +08:00
Made AnimatedContainer scrollable
This commit is contained in:
parent
36f083c898
commit
5729eed175
2 changed files with 21 additions and 10 deletions
|
@ -9,13 +9,22 @@ export interface props {
|
|||
|
||||
export default function AnimatedContainer(props: props) {
|
||||
return (
|
||||
<MotiView
|
||||
style={styles.container}
|
||||
from={{ opacity: 0, backgroundColor: colors.orange_1 }}
|
||||
animate={{ opacity: 1, backgroundColor: colors.blue_2 }}
|
||||
transition={{ type: "timing", duration: 300 }}
|
||||
>
|
||||
{props.children}
|
||||
</MotiView>
|
||||
<View style={styles.container}>
|
||||
<MotiScrollView
|
||||
from={{
|
||||
opacity: 0,
|
||||
backgroundColor: colors.orange_1,
|
||||
flex: 1,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
backgroundColor: colors.blue_2,
|
||||
flex: 1,
|
||||
}}
|
||||
transition={{ type: "timing", duration: 300 }}
|
||||
>
|
||||
{props.children}
|
||||
</MotiScrollView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue