Skip to content

Commit 4f35c7d

Browse files
committed
UI changes
1 parent 58b5183 commit 4f35c7d

File tree

6 files changed

+99
-8
lines changed

6 files changed

+99
-8
lines changed

src/ui/layouts/common/CustomStackBox/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const CustomStackBox: React.FC<{
1414

1515
return (
1616
<Box
17-
paddingHorizontal="sm2"
17+
paddingHorizontal="sm2"
1818
paddingVertical="sm2"
1919
className={styles.stackBox}
2020
>

src/ui/layouts/common/FormElement/index.module.scss

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,69 @@
6565

6666
.slider.round:before {
6767
border-radius: 50%;
68+
}
69+
70+
71+
// switch blue
72+
73+
.switchContainer {
74+
margin-top: 20px !important;
75+
}
76+
77+
.switchLabel {
78+
font-family: 'Rubik';
79+
color: rgba(66, 66, 64, 0.5);
80+
font-size: 14px;
81+
font-weight: 700;
82+
line-height: 17px;
83+
letter-spacing: 0em;
84+
text-align: right;
85+
margin-right: 15px;
86+
}
87+
88+
.sliderBlue {
89+
position: absolute;
90+
cursor: pointer;
91+
top: 0;
92+
left: 0;
93+
right: 0;
94+
bottom: 0;
95+
background-color: #ccc;
96+
-webkit-transition: .4s;
97+
transition: .4s;
98+
}
99+
100+
.sliderBlue:before {
101+
position: absolute;
102+
content: "";
103+
height: 17px;
104+
width: 17px;
105+
left: 1px;
106+
bottom: 2px;
107+
background-color: white;
108+
-webkit-transition: .4s;
109+
transition: .4s;
110+
}
111+
112+
input:checked + .sliderBlue {
113+
background-color: #22BBDD;
114+
}
115+
116+
input:focus + .sliderBlue {
117+
box-shadow: 0 0 1px #22BBDD;
118+
}
119+
120+
input:checked + .sliderBlue:before {
121+
-webkit-transform: translateX(19px);
122+
-ms-transform: translateX(19px);
123+
transform: translateX(19px);
124+
}
125+
126+
/* Rounded sliders */
127+
.sliderBlue.round {
128+
border-radius: 34px;
129+
}
130+
131+
.sliderBlue.round:before {
132+
border-radius: 50%;
68133
}

src/ui/layouts/common/FormElement/index.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,31 @@ export function ToggleField(props: any) {
5050
);
5151
}
5252

53+
export function ToggleFieldBlock(props: any) {
54+
const { name, value, onHandleChange, label } = props;
55+
return (
56+
<Box style={{ height: '68px' }}>
57+
<FlexBox.Row justifyContent="space-between" flexDirection='column'>
58+
<Box>
59+
<Paragraph size="body" style={{ color: '#000' }}>
60+
{label}
61+
</Paragraph>
62+
</Box>
63+
<FlexBox.Row className={styles.switchContainer}>
64+
<div><span className={styles.switchLabel} >{value ? <>Yes</> : <>No</>}</span></div>
65+
<label className={styles.switch}>
66+
<input
67+
type="checkbox"
68+
onChange={(event) => onHandleChange(name, event.target.checked)}
69+
/>
70+
<span className={`${styles.sliderBlue} ${styles.round}`}></span>
71+
</label>
72+
</FlexBox.Row>
73+
</FlexBox.Row>
74+
</Box>
75+
);
76+
}
77+
5378
// export function SubmitButton(props: any) {
5479
// const { title, ...rest } = props;
5580
// console.log(props, 'asdasdasdasd222221111');

src/ui/layouts/common/StackBox/index.module.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
.stackBox {
44
width: 171px;
5-
height: 130px;
6-
height: 100%;
5+
min-height: 127px;
76
padding: 10px;
87
background-color: #fff;
98
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.05);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export const GetList: React.FC<Props> = ({
8282
return <FullWidthSpinner color="black" size="md" />;
8383
}
8484
const helperTextStyle = {
85+
fontFamily: 'Rubik',
8586
fontSize: '16px',
8687
color: '#A8A8A8',
8788
marginLeft: '10px',

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState } from 'react';
22
import styles from './index.module.scss';
33
import { Box, FlexBox, H2, FormTextField } from '../../../../components';
4-
import { ToggleField } from '../../../common/FormElement';
4+
import { ToggleFieldBlock } from '../../../common/FormElement';
55

66
import {
77
sessionSelectors,
@@ -185,7 +185,7 @@ export const ListForAll: React.FC<Props> = () => {
185185
</Box>
186186

187187
<Box marginTop="lg">
188-
<FlexBox.Row>
188+
<FlexBox.Row alignItems='center'>
189189
<Box style={{ width: '30%' }}>
190190
<FormTextField
191191
required={'*'}
@@ -197,9 +197,10 @@ export const ListForAll: React.FC<Props> = () => {
197197
value={stackName}
198198
/>
199199
</Box>
200-
<Box marginLeft="xxxl" marginTop="md" style={{ width: '30%' }}>
201-
<ToggleField
200+
<Box marginLeft='xl' style={{ width: '30%' }}>
201+
<ToggleFieldBlock
202202
label={'Share Stack with public'}
203+
value={isShared}
203204
onHandleChange={(value: any) => setIshared(!isShared)}
204205
/>
205206
</Box>
@@ -237,7 +238,7 @@ export const ListForAll: React.FC<Props> = () => {
237238
<FlexBox.Column>
238239
{stackComponentsTypes?.map((item) => {
239240
return (
240-
<Box marginTop="lg" style={{ overflowX: 'auto' }}>
241+
<Box marginTop="lg" style={{ overflow: 'auto' }}>
241242
<GetList
242243
type={item}
243244
flavourList={flavourList}

0 commit comments

Comments
 (0)