Skip to content

Commit 4fb7686

Browse files
added resize icon
Signed-off-by: saurabhraghuvanshii <[email protected]>
1 parent 3a0d70f commit 4fb7686

File tree

7 files changed

+58
-4
lines changed

7 files changed

+58
-4
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,5 @@ This repository and site are available as open source under the terms of the [Ap
148148
<p>The <a href="https://layer5.io/community">Layer5 community</a> represents the largest collection of service mesh projects and their maintainers in the world.</p>
149149

150150
**Open Source First**
151+
151152
<p>At Layer5, we champion developer-defined infrastructure, giving engineers the power to reshape application delivery. We empower operators in reimagining how they manage modern infrastructure: collaboratively.</p>

src/custom/CollaboratorAvatarGroup/CollaboratorAvatarGroup.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ExpandMore } from '@mui/icons-material';
22
import { MouseEvent, useState } from 'react';
3-
import { Avatar, AvatarGroup, Button, Popover, Typography, Divider } from '../../base';
3+
import { Avatar, AvatarGroup, Button, Divider, Popover, Typography } from '../../base';
44
import { iconSmall } from '../../constants/iconsSizes';
55
import { styled, useTheme } from '../../theme';
66
import { DARK_TEAL_BLUE } from '../../theme/colors/colors';
@@ -146,7 +146,17 @@ const CollaboratorAvatarGroup = ({
146146
key={clientID}
147147
title={
148148
<div style={{ display: 'flex', justifyContent: 'center', flexDirection: 'column' }}>
149-
<Typography style={{ display: 'flex', justifyContent: 'center', flexDirection: 'column', margin: 'auto', fontSize: '1rem' }}>{user.name}</Typography>
149+
<Typography
150+
style={{
151+
display: 'flex',
152+
justifyContent: 'center',
153+
flexDirection: 'column',
154+
margin: 'auto',
155+
fontSize: '1rem'
156+
}}
157+
>
158+
{user.name}
159+
</Typography>
150160
<Divider />
151161
<Button
152162
size="small"

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: '-14px',
136+
right: '14px',
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/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)