Skip to content

Commit f22181c

Browse files
committed
Fix Toast Initial TranslateY value
1 parent d6800ec commit f22181c

4 files changed

Lines changed: 6 additions & 7 deletions

File tree

packages/carbon-react-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@audira/carbon-react-native",
3-
"version": "1.0.0-beta.20",
3+
"version": "1.0.0-beta.21",
44
"license": "MIT",
55
"homepage": "https://rakadoank.github.io/carbon-react-native",
66
"repository": "https://github.com/RakaDoank/carbon-react-native",

packages/carbon-react-native/src/providers/toast/_overlay/Overlay.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ export const Overlay = forwardRef<OverlayRef>(
120120
componentsConfig.current[index].width = target.children?.[0]?.clientWidth
121121
// @ts-expect-error Web DOM
122122
componentsConfig.current[index].height = target.children?.[0]?.clientHeight
123-
124123
} else {
125124
componentsConfig.current[index].width = event.nativeEvent.layout.width
126125
componentsConfig.current[index].height = event.nativeEvent.layout.height

packages/carbon-react-native/src/providers/toast/_overlay/_component-wrapper/ComponentWrapper.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ export const ComponentWrapper = forwardRef<ComponentWrapperRef, ComponentWrapper
5454
useRef(0),
5555

5656
translateY =
57-
useRef(new Animated.Value(safeAreaInsets.top + Gap)),
57+
useRef(new Animated.Value(safeAreaInsets.top)),
5858

5959
translateYValueJS =
60-
useRef(0)
60+
useRef(safeAreaInsets.top)
6161

6262
useEffect(() => {
6363
const
@@ -159,13 +159,13 @@ const
159159
componentWrapper: {
160160
position: "absolute",
161161
left: "100%",
162-
width: "auto",
162+
top: Gap,
163163
...Platform.select({
164164
web: {
165165
flexDirection: "row",
166166
},
167-
android: {
168-
top: Gap, // iOS doesn't need this, Apple handles it internally
167+
ios: {
168+
top: 0,
169169
},
170170
}),
171171
},

packages/carbon-react-native/src/providers/toast/index.tsx renamed to packages/carbon-react-native/src/providers/toast/index.ts

File renamed without changes.

0 commit comments

Comments
 (0)