Skip to content

Commit 3da1a86

Browse files
authored
Merge branch 'master' into fix/filter_header
2 parents 5a8ff6f + f548d8d commit 3da1a86

8 files changed

Lines changed: 51 additions & 7 deletions

File tree

src/custom/CustomTooltip/customTooltip.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ function CustomTooltip({
2929
}: CustomTooltipProps): JSX.Element {
3030
return (
3131
<Tooltip
32-
enterDelay={0}
33-
leaveDelay={1200}
32+
enterTouchDelay={0}
33+
leaveTouchDelay={2000}
3434
componentsProps={_.merge(
3535
{
3636
tooltip: {

src/custom/Modal/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export const Modal: React.FC<ModalProps> = ({
175175
{...props}
176176
>
177177
{title && (
178-
<ModalStyledHeader data-testid="modal-header">
178+
<ModalStyledHeader className='modal-header' data-testid="modal-header">
179179
{headerIcon && <Box data-testid="modal-header-icon">{headerIcon}</Box>}
180180
<Typography component={'div'} variant="h6" data-testid="modal-title">
181181
{title}
@@ -199,7 +199,7 @@ export const Modal: React.FC<ModalProps> = ({
199199
)}
200200
</CustomTooltip>
201201
)}
202-
<CloseBtn onClick={closeModal} data-testid="modal-close-btn">
202+
<CloseBtn onClick={closeModal} className='modal-close-btn' data-testid="modal-close-btn">
203203
<CloseIcon {...iconLarge} fill="#fff"></CloseIcon>
204204
</CloseBtn>
205205
</div>
@@ -214,7 +214,7 @@ export const Modal: React.FC<ModalProps> = ({
214214

215215
export const ModalFooter: React.FC<ModalFooterProps> = ({ helpText, children, variant }) => {
216216
return (
217-
<StyledFooter variant={variant} hasHelpText={!!helpText}>
217+
<StyledFooter className='modal-footer' variant={variant} hasHelpText={!!helpText}>
218218
{helpText && (
219219
// <CustomTooltip title={helpText} variant="standard" placement="top">
220220
// <IconButton>

src/custom/Panel/Panel.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Resizable } from 're-resizable';
22
import React from 'react';
33
import Draggable from 'react-draggable';
44
import { Box, BoxProps, Tooltip } from '../../base';
5-
import { CloseIcon, CollapseAllIcon, ExpandAllIcon, FullScreenIcon } from '../../icons';
5+
import { CloseIcon, CollapseAllIcon, ExpandAllIcon, FullScreenIcon, ResizeIcon } from '../../icons';
66
import { useTheme } from '../../theme';
77
import { ErrorBoundary } from '../ErrorBoundary';
88
import {
@@ -14,7 +14,8 @@ import {
1414
PanelBody,
1515
PanelContainer,
1616
PanelTitle,
17-
ResizableContent
17+
ResizableContent,
18+
ResizeIconContainer
1819
} from './style';
1920

2021
export type PanelProps = {
@@ -108,6 +109,9 @@ const Panel_: React.FC<PanelProps> = ({
108109
</div>
109110
<PanelBody className="panel-body">{children}</PanelBody>
110111
</ErrorBoundary>
112+
<ResizeIconContainer>
113+
<ResizeIcon />
114+
</ResizeIconContainer>
111115
</ResizableContent>
112116
</Resizable>
113117
</PanelContainer>

src/custom/Panel/style.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,17 @@ export const PanelTitle = styled('div')(() => ({
129129
marginInline: 'auto',
130130
width: 'fit-content'
131131
}));
132+
133+
export const ResizeIconContainer = styled('div')(({ theme }) => ({
134+
position: 'absolute',
135+
bottom: '2px',
136+
left: '4px',
137+
pointerEvents: 'none',
138+
'& svg': {
139+
width: '18px',
140+
height: '18px',
141+
stroke: 'currentColor',
142+
fill: 'currentColor',
143+
color: theme.palette.text.primary
144+
}
145+
}));

src/custom/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
export * from './CustomTooltip';
33
export * from './HelperTextPopover';
44
export * from './Markdown';
5+
export * from './Modal';

src/icons/Resize/ResizeIcon.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { FC } from 'react';
2+
import { DEFAULT_HEIGHT, DEFAULT_WIDTH } from '../../constants/constants';
3+
import { IconProps } from '../types';
4+
5+
export const ResizeIcon: FC<IconProps> = ({
6+
width = DEFAULT_WIDTH,
7+
height = DEFAULT_HEIGHT,
8+
...props
9+
}) => {
10+
return (
11+
<svg
12+
width={width}
13+
height={height}
14+
xmlns="http://www.w3.org/2000/svg"
15+
viewBox="0 0 512 512"
16+
{...props}
17+
>
18+
<path d="M418.3 80H307.8c-7.5 0-13.7 6.1-13.7 13.7v.2c0 7.5 6.1 13.7 13.7 13.7h76.5L107.6 384.3v-76.5c0-7.5-6.1-13.7-13.7-13.7h-.2c-7.5 0-13.7 6.1-13.7 13.7v110.5c0 7.5 6.1 13.7 13.7 13.7h110.5c7.5 0 13.7-6.1 13.7-13.7v-.2c0-7.5-6.1-13.7-13.7-13.7h-76.5l276.7-276.7v76.5c0 7.5 6.1 13.7 13.7 13.7h.2c7.5 0 13.7-6.1 13.7-13.7V93.7c0-7.6-6.1-13.7-13.7-13.7z" />
19+
</svg>
20+
);
21+
};
22+
23+
export default ResizeIcon;

src/icons/Resize/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default as ResizeIcon } from './ResizeIcon';

src/icons/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export * from './Rectangle';
9999
export * from './Redo';
100100
export * from './Remove';
101101
export * from './Reset';
102+
export * from './Resize';
102103
export * from './RightArrow';
103104
export * from './Ring';
104105
export * from './Save';

0 commit comments

Comments
 (0)