Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/www/src/content/docs/components/alert-dialog/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const getCode = (props: { title?: string; description?: string }) => {
<AlertDialog.Trigger render={<Button color="danger" />}>
Discard draft
</AlertDialog.Trigger>
<AlertDialog.Content width={400} showCloseButton={false}>
<AlertDialog.Content width={400}>
<AlertDialog.Body>
<AlertDialog.Title>${title}</AlertDialog.Title>
<AlertDialog.Description>
Expand Down Expand Up @@ -45,7 +45,7 @@ export const controlledDemo = {
<AlertDialog.Trigger render={<Button color="danger" />}>
Delete Account
</AlertDialog.Trigger>
<AlertDialog.Content width={450} showCloseButton={false}>
<AlertDialog.Content width={450}>
<AlertDialog.Header>
<AlertDialog.Title>Delete Account</AlertDialog.Title>
</AlertDialog.Header>
Expand Down Expand Up @@ -88,7 +88,7 @@ export const menuDemo = {
</Menu>

<AlertDialog open={dialogOpen} onOpenChange={setDialogOpen}>
<AlertDialog.Content width={400} showCloseButton={false}>
<AlertDialog.Content width={400}>
<AlertDialog.Body>
<AlertDialog.Title>Delete item?</AlertDialog.Title>
<AlertDialog.Description>
Expand All @@ -113,7 +113,7 @@ export const discardDemo = {
<AlertDialog.Trigger render={<Button variant="outline" />}>
Discard Changes
</AlertDialog.Trigger>
<AlertDialog.Content width={400} showCloseButton={false}>
<AlertDialog.Content width={400}>
<AlertDialog.Header>
<AlertDialog.Title>Unsaved Changes</AlertDialog.Title>
</AlertDialog.Header>
Expand Down Expand Up @@ -151,7 +151,7 @@ export const nestedDemo = {
<AlertDialog.Trigger render={<Button color="danger" size="small" />}>
Confirm Delete
</AlertDialog.Trigger>
<AlertDialog.Content width={400} showCloseButton={false}>
<AlertDialog.Content width={400}>
<AlertDialog.Body>
<AlertDialog.Title>Final Confirmation</AlertDialog.Title>
<AlertDialog.Description>
Expand Down
2 changes: 1 addition & 1 deletion apps/www/src/content/docs/components/alert-dialog/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface AlertDialogContentProps {

/**
* Controls whether to show the close button
* @default true
* @default false
*/
showCloseButton?: boolean;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const BasicAlertDialog = ({
}) => (
<AlertDialog open={open} onOpenChange={onOpenChange} {...props}>
<AlertDialog.Trigger>{TRIGGER_TEXT}</AlertDialog.Trigger>
<AlertDialog.Content>
<AlertDialog.Content showCloseButton>
<AlertDialog.Header>
<AlertDialog.Title>{ALERT_TITLE}</AlertDialog.Title>
</AlertDialog.Header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface AlertDialogContentProps
export const AlertDialogContent = ({
className,
children,
showCloseButton = true,
showCloseButton = false,
Comment thread
Shreyag02 marked this conversation as resolved.
overlay,
width,
style,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { cx } from 'class-variance-authority';
import { type ComponentProps } from 'react';
import styles from '../dialog/dialog.module.css';
import { Flex } from '../flex';
import alertDialogStyles from './alert-dialog.module.css';

export const AlertDialogHeader = ({
className,
Expand All @@ -28,7 +29,7 @@ export const AlertDialogFooter = ({
<Flex
gap={5}
justify='end'
className={cx(styles.footer, className)}
className={cx(styles.footer, alertDialogStyles.footer, className)}
{...props}
/>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.footer {
border-top: 0;
}
4 changes: 2 additions & 2 deletions packages/raystack/components/dialog/dialog.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@
padding: var(--rs-space-7);
}

.body:has(+ .footer) {
border-bottom: 1px solid var(--rs-color-border-base-primary);
:where(.body) + .footer {
border-top: 1px solid var(--rs-color-border-base-primary);
}

.description {
Expand Down
Loading