Skip to content

Commit 0d6ca8c

Browse files
committed
added side popup
1 parent 55d9f1e commit 0d6ca8c

File tree

3 files changed

+132
-3
lines changed

3 files changed

+132
-3
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
@import '../../../../../globalStyles.scss';
2+
3+
.sidePopup {
4+
background: #ffffff;
5+
border-radius: 4px;
6+
position: fixed;
7+
right: 0;
8+
bottom: 0;
9+
top: 13rem;
10+
height: 800px;
11+
// height: 677px;
12+
min-width: 700px;
13+
overflow-x: auto;
14+
}
15+
16+
@media (max-width: $md-breakpoint) {
17+
.sidePopup {
18+
max-width: 80vw;
19+
min-width: 0;
20+
}
21+
}
22+
23+
.popupContainer {
24+
position: fixed;
25+
height: 100vh;
26+
width: 100vw;
27+
top: 0;
28+
left: 0;
29+
z-index: 99999;
30+
}
31+
32+
.popupClose {
33+
background-color: #fff;
34+
border-radius: 100px;
35+
position: absolute;
36+
top: 15rem;
37+
right: 70rem;
38+
z-index: 999;
39+
}
40+
41+
.actionSection {
42+
min-width: 683px;
43+
background-color: white;
44+
position: fixed;
45+
bottom: 0;
46+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import React from 'react';
2+
import OutsideClickHandler from 'react-outside-click-handler';
3+
4+
import {
5+
Box,
6+
FlexBox,
7+
icons,
8+
LinkBox,
9+
Paragraph,
10+
H3,
11+
PrimaryButton,
12+
} from '../../../../../components';
13+
14+
import styles from './index.module.scss';
15+
16+
17+
export const SidePopup: React.FC<{
18+
onSeeExisting: () => void;
19+
onClose: () => void;
20+
registerStack: any;
21+
}> = ({ children, onClose, registerStack, onSeeExisting }) => (
22+
<>
23+
<FlexBox
24+
alignItems="center"
25+
justifyContent="center"
26+
className={styles.popupContainer}
27+
>
28+
<Box className={styles.popupClose}>
29+
<LinkBox onClick={onClose}>
30+
<icons.closeWithBorder />
31+
</LinkBox>
32+
</Box>
33+
34+
<Box className={styles.sidePopup}>
35+
<OutsideClickHandler onOutsideClick={onClose}>
36+
<Box paddingVertical="lg" paddingHorizontal="xxxl">
37+
<H3 style={{ color: '#443E99', fontWeight: 'bold' }} >Configurations</H3>
38+
{children}
39+
</Box>
40+
41+
<Box
42+
paddingVertical="lg"
43+
paddingHorizontal="md"
44+
className={styles.actionSection}
45+
>
46+
<FlexBox.Row justifyContent="space-between" alignItems="center">
47+
<Box>
48+
<LinkBox onClick={onSeeExisting}>
49+
<Paragraph>Edit Component</Paragraph>
50+
</LinkBox>
51+
</Box>
52+
<Box>
53+
<PrimaryButton onClick={registerStack}>Register Stack</PrimaryButton>
54+
</Box>
55+
</FlexBox.Row>
56+
</Box>
57+
</OutsideClickHandler>
58+
</Box>
59+
</FlexBox>
60+
</>
61+
);

src/ui/layouts/stacks/CreateStack/ListForAll/index.tsx

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { stackComponentSelectors } from '../../../../../redux/selectors';
66
import { useSelector } from 'react-redux';
77
import { GetList } from './GetList';
88
import { GetFlavorsListForLogo } from '../../../stackComponents/Stacks/List/GetFlavorsListForLogo';
9+
import { SidePopup } from './SidePopup';
910

1011
interface Props {}
1112

@@ -17,7 +18,12 @@ export const ListForAll: React.FC<Props> = () => {
1718

1819
const [selectedStack, setSelectedStack] = useState<any>([]);
1920
const [selectedStackBox, setSelectedStackBox] = useState<any>();
20-
console.log(selectedStack);
21+
const [showPopup, setShowPopup] = useState<boolean>(false);
22+
23+
const selectStack = (data: any) => {
24+
setShowPopup(true)
25+
setSelectedStackBox(data)
26+
}
2127

2228
return (
2329
<Box style={{ width: '100%' }}>
@@ -48,7 +54,7 @@ export const ListForAll: React.FC<Props> = () => {
4854
<FlexBox.Row marginTop="md">
4955
{selectedStack?.map((e: any) => (
5056
<Box
51-
onClick={() => setSelectedStackBox(e.id)}
57+
onClick={() => selectStack(e)}
5258
marginLeft="sm"
5359
style={{
5460
height: '60px',
@@ -73,7 +79,6 @@ export const ListForAll: React.FC<Props> = () => {
7379
))}
7480
</FlexBox.Row>
7581
)}
76-
{console.log('selectedStackselectedStackselectedStack', selectedStack)}
7782

7883
<FlexBox.Column>
7984
{stackComponentsTypes?.map((item) => {
@@ -90,6 +95,23 @@ export const ListForAll: React.FC<Props> = () => {
9095
})}
9196
</FlexBox.Column>
9297

98+
{showPopup &&
99+
<SidePopup
100+
registerStack={() => {}}
101+
onSeeExisting={() => {}}
102+
onClose={() => setShowPopup(false)}
103+
>
104+
<Box marginTop='md'>
105+
<FormTextField
106+
onChange={(e: any) => {}}
107+
placeholder=""
108+
label='Stack Name'
109+
value={selectedStackBox.name}
110+
/>
111+
</Box>
112+
</SidePopup>
113+
}
114+
93115
{/* <Box marginTop="lg" style={{ overflowX: 'auto' }}>
94116
<FlexBox.Row alignItems="center">
95117
<H3 style={{ fontWeight: 'bold' }}>Artifact Store</H3>

0 commit comments

Comments
 (0)