UNPKG

@ontech7/react-native-dialog

Version:

Simple and lightweight dialog component for React Native, structure similar to shadcn/ui, with dimezis background blur. Compatible with Android & iOS.

22 lines (21 loc) 678 B
import React from "react"; import { StyleSheet, Text, View } from "react-native"; import { useDialogStyles } from "./DialogProvider"; export function DialogTitle({ children, adornmentStart, adornmentEnd, style, ...props }) { const { title } = useDialogStyles(); return (React.createElement(View, { style: styles.container }, adornmentStart, React.createElement(Text, { ...props, style: [styles.text, title] }, children), adornmentEnd)); } const styles = StyleSheet.create({ container: { flexDirection: "row", alignItems: "center", gap: 6, }, text: { fontSize: 22, fontWeight: "600", }, });