UNPKG

@nayan-ui/react-native

Version:

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

30 lines (29 loc) 946 B
"use strict"; import React from 'react'; import { Alert, AlertDescription, AlertTitle } from "./ui/alert.js"; import { AlertCircle } from "../lib/icons/AlertCircle.js"; import { cn } from "../lib/utils.js"; import { jsx as _jsx, jsxs as _jsxs } from "react-native-css-interop/jsx-runtime"; export const NAlert = /*#__PURE__*/React.memo(({ title, description, className, titleClassName, descriptionClassName, iconClassName }) => { return _jsxs(Alert, { icon: AlertCircle, className: cn('w-full bg-card border-border shadow-none rounded', className), iconClassName: iconClassName, children: [title && _jsx(AlertTitle, { className: cn('text-text font-medium mb-1', titleClassName), children: title }), _jsx(AlertDescription, { className: cn('text-text text-sm', descriptionClassName), children: description })] }); }); NAlert.displayName = 'NAlert'; //# sourceMappingURL=NAlert.js.map