Skip to content

Commit

Permalink
feat(design): change the style of the Dialog and Select (#1352)
Browse files Browse the repository at this point in the history
  • Loading branch information
jikkai committed Feb 7, 2024
1 parent 157b4db commit 0204b43
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
16 changes: 13 additions & 3 deletions packages/design/src/components/dialog/Dialog.tsx
Expand Up @@ -23,16 +23,24 @@ import { ConfigContext } from '../config-provider/ConfigProvider';
import styles from './index.module.less';

export interface IDialogProps {
width?: number | string;

children: React.ReactNode;

/**
* The style of the dialog.
*/
style?: React.CSSProperties;

/**
* Whether the dialog is visible.
* @default false
*/
visible?: boolean;

/**
* The width of the dialog.
*/
width?: number | string;

/**
* The title of the dialog.
*/
Expand Down Expand Up @@ -65,13 +73,14 @@ export interface IDialogProps {
export function Dialog(props: IDialogProps) {
const {
children,
style,
visible = false,
title,
width,
draggable = false,
closeIcon = <CloseSingle />,
footer,
onClose,
width,
} = props;
const [dragDisabled, setDragDisabled] = useState(false);

Expand Down Expand Up @@ -118,6 +127,7 @@ export function Dialog(props: IDialogProps) {
footer={footer}
onClose={onClose}
mask={!draggable}
style={style}
>
{children}
</RcDialog>
Expand Down
1 change: 1 addition & 0 deletions packages/design/src/components/select/index.module.less
Expand Up @@ -226,6 +226,7 @@
position: absolute;

min-height: 100px;
z-index: 1060;

background: rgb(var(--bg-color-secondary));
border: 1px solid rgb(var(--border-color));
Expand Down

0 comments on commit 0204b43

Please sign in to comment.