@radix-ui/themes
Version:
[](https://radix-ui.com/themes)
3 lines (2 loc) • 2.01 kB
JavaScript
import*as e from"react";import T from"classnames";import{AlertDialog as r}from"radix-ui";import{alertDialogContentPropDefs as R}from"./alert-dialog.props.js";import{Heading as h}from"./heading.js";import{Text as E}from"./text.js";import{Theme as N}from"./theme.js";import{extractProps as a}from"../helpers/extract-props.js";import{requireReactElement as l}from"../helpers/require-react-element.js";const n=t=>e.createElement(r.Root,{...t});n.displayName="AlertDialog.Root";const s=e.forwardRef(({children:t,...o},i)=>e.createElement(r.Trigger,{...o,ref:i,asChild:!0},l(t)));s.displayName="AlertDialog.Trigger";const p=e.forwardRef(({align:t,...o},i)=>{const{align:P,...c}=R,{className:f}=a({align:t},{align:P}),{className:C,forceMount:d,container:y,...v}=a(o,c);return e.createElement(r.Portal,{container:y,forceMount:d},e.createElement(N,{asChild:!0},e.createElement(r.Overlay,{className:"rt-BaseDialogOverlay rt-AlertDialogOverlay"},e.createElement("div",{className:"rt-BaseDialogScroll rt-AlertDialogScroll"},e.createElement("div",{className:`rt-BaseDialogScrollPadding rt-AlertDialogScrollPadding ${f}`},e.createElement(r.Content,{...v,ref:i,className:T("rt-BaseDialogContent","rt-AlertDialogContent",C)}))))))});p.displayName="AlertDialog.Content";const g=e.forwardRef((t,o)=>e.createElement(r.Title,{asChild:!0},e.createElement(h,{size:"5",mb:"3",trim:"start",...t,asChild:!1,ref:o})));g.displayName="AlertDialog.Title";const m=e.forwardRef((t,o)=>e.createElement(r.Description,{asChild:!0},e.createElement(E,{as:"p",size:"3",...t,asChild:!1,ref:o})));m.displayName="AlertDialog.Description";const D=e.forwardRef(({children:t,...o},i)=>e.createElement(r.Action,{...o,ref:i,asChild:!0},l(t)));D.displayName="AlertDialog.Action";const A=e.forwardRef(({children:t,...o},i)=>e.createElement(r.Cancel,{...o,ref:i,asChild:!0},l(t)));A.displayName="AlertDialog.Cancel";export{D as Action,A as Cancel,p as Content,m as Description,n as Root,g as Title,s as Trigger};
//# sourceMappingURL=alert-dialog.js.map