-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca10b1c
commit 2f7d16c
Showing
662 changed files
with
7,845 additions
and
4,796 deletions.
There are no files selected for viewing
42 changes: 0 additions & 42 deletions
42
.yarn/patches/react-native-wagmi-charts-npm-2.5.1-c9e2637be7.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
web/5.36.3 | ||
web/5.37.0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// RelativeOffsetView.swift | ||
// Uniswap | ||
// | ||
// Created by Mateusz Łopaciński on 18/06/2024. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct RelativeOffsetView<Content: View>: View { | ||
var x: CGFloat | ||
var y: CGFloat | ||
var onOffsetCalculated: (CGFloat, CGFloat) -> Void | ||
var content: Content | ||
|
||
@State private var contentSize: CGSize = .zero | ||
|
||
init(x: CGFloat = 0, y: CGFloat = 0, onOffsetCalculated: @escaping (CGFloat, CGFloat) -> Void = { _, _ in }, @ViewBuilder content: () -> Content) { | ||
self.x = x | ||
self.y = y | ||
self.onOffsetCalculated = onOffsetCalculated | ||
self.content = content() | ||
} | ||
|
||
var body: some View { | ||
content | ||
.background( | ||
GeometryReader { geometry in | ||
Color.clear | ||
.onAppear { | ||
let offsetX = x * geometry.size.width | ||
let offsetY = y * geometry.size.height | ||
contentSize = geometry.size | ||
onOffsetCalculated(offsetX, offsetY) | ||
} | ||
.onChange(of: geometry.size) { newSize in | ||
let offsetX = x * newSize.width | ||
let offsetY = y * newSize.height | ||
contentSize = newSize | ||
onOffsetCalculated(offsetX, offsetY) | ||
} | ||
} | ||
) | ||
.offset(x: x * contentSize.width, y: y * contentSize.height) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.