UNPKG

@nayan-ui/react-native

Version:

React Native Component Library for smooth and faster mobile application development.

37 lines (36 loc) 1.12 kB
"use strict"; import React from 'react'; import { View } from 'react-native'; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "./ui/dialog.js"; import { cn } from "../lib/utils.js"; import { jsx as _jsx, jsxs as _jsxs } from "react-native-css-interop/jsx-runtime"; export const NDialog = /*#__PURE__*/React.memo(({ children, trigger, title, className = '', headerClassName = '', headerTitleClassName = '', contentClassName = '' }) => { return _jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: trigger }), _jsxs(DialogContent, { className: cn('border-border rounded p-0 min-w-[320px] sm:max-w-[425px]', className), children: [_jsx(DialogHeader, { className: cn('px-3 py-2', headerClassName), children: _jsx(DialogTitle, { className: cn('text-text', headerTitleClassName), children: title }) }), _jsx(View, { className: contentClassName, children: children })] })] }); }); NDialog.displayName = 'NDialog'; //# sourceMappingURL=NDialog.js.map