@@ -22,11 +22,11 @@ const ConfirmationContext = createContext<ConfirmationContextValue | null>(
2222
2323const useConfirmation = ( ) => {
2424 const context = useContext ( ConfirmationContext ) ;
25-
25+
2626 if ( ! context ) {
2727 throw new Error ( "Confirmation components must be used within Confirmation" ) ;
2828 }
29-
29+
3030 return context ;
3131} ;
3232
@@ -41,11 +41,7 @@ export const Confirmation = ({
4141 state,
4242 ...props
4343} : ConfirmationProps ) => {
44- if (
45- ! approval ||
46- state === "input-streaming" ||
47- state === "input-available"
48- ) {
44+ if ( ! approval || state === "input-streaming" || state === "input-available" ) {
4945 return null ;
5046 }
5147
@@ -62,16 +58,14 @@ export const ConfirmationTitle = ({
6258 className,
6359 ...props
6460} : ConfirmationTitleProps ) => (
65- < AlertDescription className = { className } { ...props } />
61+ < AlertDescription className = { cn ( "inline" , className ) } { ...props } />
6662) ;
6763
6864export type ConfirmationRequestProps = {
6965 children ?: ReactNode ;
7066} ;
7167
72- export const ConfirmationRequest = ( {
73- children,
74- } : ConfirmationRequestProps ) => {
68+ export const ConfirmationRequest = ( { children } : ConfirmationRequestProps ) => {
7569 const { state } = useConfirmation ( ) ;
7670
7771 // Only show when approval is requested
@@ -141,10 +135,7 @@ export const ConfirmationActions = ({
141135
142136 return (
143137 < div
144- className = { cn (
145- "flex items-center justify-end gap-2 self-end" ,
146- className
147- ) }
138+ className = { cn ( "flex items-center justify-end gap-2 self-end" , className ) }
148139 { ...props }
149140 />
150141 ) ;
0 commit comments