From c01663a1c2d8a0916b8a3b441b6b2495f144b714 Mon Sep 17 00:00:00 2001 From: Dominic Go <18517029+dominicstop@users.noreply.github.com> Date: Mon, 2 Oct 2023 21:26:25 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=20Refactor:=20Move=20to=20`src=5Fl?= =?UTF-8?q?ibrary`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CGPoint+RNIDictionaryRepresentable.swift | 18 ++++++++++++++++++ .../CGSize+RNIDictionaryRepresentable.swift | 0 2 files changed, 18 insertions(+) create mode 100644 ios/src_library/Extensions+RNIDictionaryRepresentable/CGPoint+RNIDictionaryRepresentable.swift rename {Extensions+RNIDictionaryRepresentable => ios/src_library/Extensions+RNIDictionaryRepresentable}/CGSize+RNIDictionaryRepresentable.swift (100%) diff --git a/ios/src_library/Extensions+RNIDictionaryRepresentable/CGPoint+RNIDictionaryRepresentable.swift b/ios/src_library/Extensions+RNIDictionaryRepresentable/CGPoint+RNIDictionaryRepresentable.swift new file mode 100644 index 00000000..9e2cf679 --- /dev/null +++ b/ios/src_library/Extensions+RNIDictionaryRepresentable/CGPoint+RNIDictionaryRepresentable.swift @@ -0,0 +1,18 @@ +// +// CGPoint+RNIDictionaryRepresentable.swift +// react-native-ios-modal +// +// Created by Dominic Go on 5/3/23. +// + +import Foundation + +extension CGPoint: RNIDictionaryRepresentable { + public var asDictionary: [String: Any] { + var dict: [String: Any] = [:]; + dict["x"] = self.x; + dict["y"] = self.y; + + return dict; + }; +}; diff --git a/Extensions+RNIDictionaryRepresentable/CGSize+RNIDictionaryRepresentable.swift b/ios/src_library/Extensions+RNIDictionaryRepresentable/CGSize+RNIDictionaryRepresentable.swift similarity index 100% rename from Extensions+RNIDictionaryRepresentable/CGSize+RNIDictionaryRepresentable.swift rename to ios/src_library/Extensions+RNIDictionaryRepresentable/CGSize+RNIDictionaryRepresentable.swift