-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'improve/improve_left_bar' into develop
- Loading branch information
Showing
234 changed files
with
1,486 additions
and
829 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,33 @@ | ||
import { FC } from "react" | ||
import { CloseIcon, DragPointIcon } from "@illa-design/react" | ||
import { Link } from "react-router-dom" | ||
import { CloseIcon, DocsIcon, DragPointIcon } from "@illa-design/react" | ||
import IconHotSpot from "@/components/IconHotSpot" | ||
import { HeaderProps } from "@/components/Modal/Header/interface" | ||
import { | ||
applyTitleStyle, | ||
closeButtonHotSpotStyle, | ||
dragIconStyle, | ||
headerContainerStyle, | ||
headerWrapperStyle, | ||
titleStyle, | ||
} from "@/components/Modal/Header/style" | ||
|
||
export const ModalHeader: FC<HeaderProps> = (props) => { | ||
const { title, canMove, onClose } = props | ||
const { title, canMove, docLink, onClose } = props | ||
return ( | ||
<div css={headerWrapperStyle}> | ||
{canMove && <DragPointIcon css={dragIconStyle} />} | ||
<span css={applyTitleStyle(canMove)}>{title}</span> | ||
<div css={closeButtonHotSpotStyle} onClick={onClose}> | ||
<CloseIcon /> | ||
<div css={headerContainerStyle}> | ||
{canMove && <DragPointIcon css={dragIconStyle} />} | ||
<span css={titleStyle}>{title}</span> | ||
{docLink && ( | ||
<Link to={docLink} target="_blank"> | ||
<IconHotSpot> | ||
<DocsIcon /> | ||
</IconHotSpot> | ||
</Link> | ||
)} | ||
</div> | ||
<IconHotSpot onClick={onClose}> | ||
<CloseIcon /> | ||
</IconHotSpot> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export interface HeaderProps { | ||
title: string | ||
docLink?: string | ||
canMove?: boolean | ||
onClose: () => void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
import { ReactNode } from "react" | ||
|
||
export interface ModalProps { | ||
export interface BaseModalProps { | ||
title: string | ||
bodyContent: ReactNode | ||
footerContent?: ReactNode | ||
docLink?: string | ||
onClose: () => void | ||
} | ||
|
||
export interface ModalProps extends BaseModalProps { | ||
docLink?: string | ||
canMove?: boolean | ||
w?: number | ||
h?: number | ||
onClose: () => void | ||
} | ||
|
||
export interface MovableModalProps { | ||
title: string | ||
bodyContent: ReactNode | ||
footerContent?: ReactNode | ||
onClose: () => void | ||
export interface MovableModalProps extends BaseModalProps { | ||
defaultPosition?: { | ||
x: number | ||
y: number | ||
width: number | ||
height: number | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.