Skip to content

Instantly share code, notes, and snippets.

View andrew-levy's full-sized avatar

Andrew Levy andrew-levy

View GitHub Profile
@andrew-levy
andrew-levy / App.tsx
Created September 10, 2023 13:21
Custom Props
import { styled } from 'style-direct-club';
import { Text } from 'react-native';
const StyledText = styled(Text, {
customProps: {
sm: {
fontSize: 12,
marginBottom: 5,
},
xl: {
@andrew-levy
andrew-levy / App.tsx
Last active September 10, 2023 13:37
With Options
import { styled } from 'style-direct-club';
const Text = styled.Text.withOptions({
aliases: {
bg: "backgroundColor",
}
});
import ExpoModulesCore
import SwiftUI
public class SwiftuiViewModule: Module {
public func definition() -> ModuleDefinition {
Name("SwiftuiForm")
View(SwiftuiView.self) {
Prop("name") { (view, name: String) in
view.name = name
}
@andrew-levy
andrew-levy / JetpackComposeView.kt
Last active April 11, 2024 05:03
JetpackComposeViewModule
package expo.modules.jetpackcomposeview
import android.content.Context
import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.*