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
import ExpoModulesCore | |
import SwiftUI | |
class DraggableProps: ExpoSwiftUI.ViewProps { | |
@Field var text: String | |
} | |
struct DraggableView: ExpoSwiftUI.View { | |
@EnvironmentObject var props: DraggableProps | |
var body: some View { |
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
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.* |
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
import { styled } from 'style-direct-club'; | |
const Text = styled.Text.withOptions({ | |
aliases: { | |
bg: "backgroundColor", | |
} | |
}); |
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
import { styled } from 'style-direct-club'; | |
import { Text } from 'react-native'; | |
const StyledText = styled(Text, { | |
customProps: { | |
sm: { | |
fontSize: 12, | |
marginBottom: 5, | |
}, | |
xl: { |
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
import { styled } from 'style-direct-club'; | |
import { TouchableOpacity } from 'react-native'; | |
const StyledTouchableOpacity = styled(TouchableOpacity, { | |
defaultStyles: { | |
backgroundColor: 'blue', | |
padding: 10, | |
borderRadius: 8, | |
}, | |
}); |
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
import { styled } from 'style-direct-club'; | |
import { View } from 'react-native'; | |
const StyledView = styled(View, { | |
aliases: { | |
bg: 'backgroundColor', | |
p: 'padding', | |
m: 'margin', | |
mt: 'marginTop', | |
}, |
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
import { Text, StyleSheet } from 'react-native' | |
import { MyButton } from './components/MyButton'; | |
function App() { | |
return ( | |
<MyButton | |
style={styles.button} | |
onPress={() => console.log("Pressed")} | |
> | |
<Text style={styles.text}>Press Me!</Text> |
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
import { styled } from 'style-direct-club'; | |
import { MyButton } from './components/MyButton'; | |
const MyStyledButton = styled(MyButton); | |
function App() { | |
return ( | |
<MyStyledButton | |
backgroundColor="blue" | |
paddingTop={10} |
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
import { VStack, Text, Button } from "swiftui-react-native"; | |
function StylingExample() { | |
return ( | |
<VStack | |
alignment="leading" | |
backgroundColor="systemGray6" | |
cornerRadius={8} | |
> | |
<Text font="title3">Styling is easy with modifiers!</Text> |
NewerOlder