Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
G
beasy-mobile
Commits
0fb08aa4
Commit
0fb08aa4
authored
Apr 25, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spring animation from bottom to top once when rendering.
parent
2f22c93a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
7 deletions
+34
-7
ContainerBorderTopCurved.tsx
src/components/ContainerBorderTopCurved.tsx
+34
-7
No files found.
src/components/ContainerBorderTopCurved.tsx
View file @
0fb08aa4
import
{
containers
}
from
"@styles/Commons"
;
import
{
useEffect
}
from
"react"
;
import
{
Animated
,
Dimensions
}
from
"react-native"
;
import
Box
from
"./bases/Box"
;
type
Props
=
{
children
:
React
.
ReactNode
};
const
ContainerBorderTopCurved
=
({
children
}:
Props
)
=>
{
const
animated
=
new
Animated
.
Value
(
0
);
useEffect
(()
=>
{
Animated
.
spring
(
animated
,
{
toValue
:
1
,
useNativeDriver
:
true
,
}).
start
();
},
[
animated
]);
return
(
<
Box
backgroundColor=
{
"white"
}
borderTopLeftRadius=
{
30
}
borderTopRightRadius=
{
30
}
style=
{
containers
.
containerFull
}
<
Animated
.
View
style=
{
[
containers
.
containerFull
,
{
transform
:
[
{
translateY
:
animated
.
interpolate
({
inputRange
:
[
0
,
1
],
outputRange
:
[
Dimensions
.
get
(
"window"
).
height
,
0
],
}),
},
],
},
]
}
>
{
children
}
</
Box
>
<
Box
backgroundColor=
{
"white"
}
borderTopLeftRadius=
{
30
}
borderTopRightRadius=
{
30
}
style=
{
containers
.
containerFull
}
>
{
children
}
</
Box
>
</
Animated
.
View
>
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment