@@ -12,7 +12,7 @@ import type { AxoSymbol } from './AxoSymbol.dom.js';
1212
1313const Namespace = 'AxoAlertDialog' ;
1414
15- const { useContentEscapeBehavior, useContentSize } = AxoBaseDialog ;
15+ const { useContentEscapeBehavior } = AxoBaseDialog ;
1616
1717/**
1818 * Displays a menu located at the pointer, triggered by a right click or a long press.
@@ -74,30 +74,29 @@ export namespace AxoAlertDialog {
7474 * --------------------------------
7575 */
7676
77- export type ContentSize = AxoBaseDialog . ContentSize ;
7877 export type ContentEscape = AxoBaseDialog . ContentEscape ;
79- export type ContentProps = AxoBaseDialog . ContentProps ;
78+ export type ContentProps = Readonly < {
79+ escape : ContentEscape ;
80+ children : ReactNode ;
81+ } > ;
8082
8183 export const Content : FC < ContentProps > = memo ( props => {
82- const sizeConfig = AxoBaseDialog . ContentSizes [ props . size ] ;
8384 const handleContentEscapeEvent = useContentEscapeBehavior ( props . escape ) ;
8485 return (
85- < AxoBaseDialog . ContentSizeProvider value = { props . size } >
86- < AlertDialog . Portal >
87- < AlertDialog . Overlay className = { AxoBaseDialog . overlayStyles } >
88- < AlertDialog . Content
89- onEscapeKeyDown = { handleContentEscapeEvent }
90- className = { AxoBaseDialog . contentStyles }
91- style = { {
92- minWidth : sizeConfig . minWidth ,
93- width : sizeConfig . width ,
94- } }
95- >
96- { props . children }
97- </ AlertDialog . Content >
98- </ AlertDialog . Overlay >
99- </ AlertDialog . Portal >
100- </ AxoBaseDialog . ContentSizeProvider >
86+ < AlertDialog . Portal >
87+ < AlertDialog . Overlay className = { AxoBaseDialog . overlayStyles } >
88+ < AlertDialog . Content
89+ onEscapeKeyDown = { handleContentEscapeEvent }
90+ className = { AxoBaseDialog . contentStyles }
91+ style = { {
92+ minWidth : 300 ,
93+ width : 300 ,
94+ } }
95+ >
96+ { props . children }
97+ </ AlertDialog . Content >
98+ </ AlertDialog . Overlay >
99+ </ AlertDialog . Portal >
101100 ) ;
102101 } ) ;
103102
@@ -113,14 +112,8 @@ export namespace AxoAlertDialog {
113112 } > ;
114113
115114 export const Body : FC < BodyProps > = memo ( props => {
116- const contentSize = useContentSize ( ) ;
117- const contentSizeConfig = AxoBaseDialog . ContentSizes [ contentSize ] ;
118-
119115 return (
120- < AxoScrollArea . Root
121- maxHeight = { contentSizeConfig . maxBodyHeight }
122- scrollbarWidth = "none"
123- >
116+ < AxoScrollArea . Root maxHeight = { 440 } scrollbarWidth = "none" >
124117 < AxoScrollArea . Hint edge = "bottom" />
125118 < AxoScrollArea . Viewport >
126119 < AxoScrollArea . Content >
@@ -208,7 +201,7 @@ export namespace AxoAlertDialog {
208201 export const Cancel : FC < CancelProps > = memo ( props => {
209202 return (
210203 < AlertDialog . Cancel asChild >
211- < AxoButton . Root variant = "secondary" size = "medium " width = "fill " >
204+ < AxoButton . Root variant = "secondary" size = "md " width = "full " >
212205 { props . children }
213206 </ AxoButton . Root >
214207 </ AlertDialog . Cancel >
@@ -239,8 +232,8 @@ export namespace AxoAlertDialog {
239232 variant = { props . variant }
240233 symbol = { props . symbol }
241234 arrow = { props . arrow }
242- size = "medium "
243- width = "fill "
235+ size = "md "
236+ width = "full "
244237 >
245238 { props . children }
246239 </ AxoButton . Root >
0 commit comments