Skip to content

Commit aee2d19

Browse files
Commit page ui (#6772)
1 parent 0e5816d commit aee2d19

File tree

4 files changed

+104
-1
lines changed

4 files changed

+104
-1
lines changed

app/client/src/components/ads/NumberedStep.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const Container = styled.div`
1212
`;
1313

1414
const Line = styled.div`
15-
width: 2px;
15+
width: 1px;
1616
flex: 1;
1717
background-color: ${(props) => props.theme.colors.numberedStep.line};
1818
`;

app/client/src/constants/messages.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,3 +447,6 @@ export const CONNECT = () => "Connect";
447447
export const DEPLOY_TO_CLOUD = () => "Deploy to cloud";
448448
export const DEPLOY_WITHOUT_GIT = () =>
449449
"Deploy your application without version control";
450+
export const DEPLOY_YOUR_APPLICATION = () => "Deploy your application";
451+
export const COMMIT = () => "COMMIT";
452+
export const PUSH = () => "PUSH";
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
import React from "react";
2+
import { Title, Caption } from "../components/StyledComponents";
3+
import {
4+
DEPLOY_YOUR_APPLICATION,
5+
COMMIT,
6+
PUSH,
7+
createMessage,
8+
} from "constants/messages";
9+
import styled from "styled-components";
10+
11+
import NumberedStep from "components/ads/NumberedStep";
12+
import OptionSelector from "../components/OptionSelector";
13+
import { noop } from "lodash";
14+
import TextInput from "components/ads/TextInput";
15+
import Button, { Size } from "components/ads/Button";
16+
17+
const Section = styled.div`
18+
display: flex;
19+
margin-bottom: ${(props) => props.theme.spaces[11]}px;
20+
`;
21+
22+
const Row = styled.div`
23+
display: flex;
24+
align-items: center;
25+
`;
26+
27+
const NumberedStepContainer = styled.div`
28+
padding-top: ${(props) => `${props.theme.spaces[3] + 1}px`};
29+
padding-right: ${(props) => `${props.theme.spaces[11]}px`};
30+
`;
31+
32+
const Gutter = styled.div`
33+
height: ${(props) => props.theme.spaces[3]}px;
34+
`;
35+
36+
// mock data
37+
const options = [
38+
{ label: "Master", value: "master" },
39+
{ label: "Feature/new-feature", value: "Feature/new-feature" },
40+
];
41+
42+
export default function Commit() {
43+
return (
44+
<>
45+
<Title>{createMessage(DEPLOY_YOUR_APPLICATION)}</Title>
46+
<Section>
47+
<NumberedStepContainer>
48+
<NumberedStep current={1} total={2} />
49+
</NumberedStepContainer>
50+
<div>
51+
<Row>
52+
<Caption>{createMessage(COMMIT)}&nbsp;</Caption>
53+
<OptionSelector
54+
onSelect={noop}
55+
options={options}
56+
selected={{
57+
label: "Feature/new-feature",
58+
value: "Feature/new-feature",
59+
}}
60+
/>
61+
</Row>
62+
<TextInput defaultValue="Initial Commit" />
63+
<Gutter />
64+
<Button
65+
size={Size.medium}
66+
text={createMessage(COMMIT)}
67+
width="max-content"
68+
/>
69+
</div>
70+
</Section>
71+
<Section>
72+
<NumberedStepContainer>
73+
<NumberedStep current={2} total={2} />
74+
</NumberedStepContainer>
75+
<div>
76+
<Row>
77+
<Caption>{createMessage(PUSH)}&nbsp;</Caption>
78+
<OptionSelector
79+
onSelect={noop}
80+
options={options}
81+
selected={{
82+
label: "Feature/new-feature",
83+
value: "Feature/new-feature",
84+
}}
85+
/>
86+
</Row>
87+
<Button
88+
size={Size.medium}
89+
text={createMessage(PUSH)}
90+
width="max-content"
91+
/>
92+
</div>
93+
</Section>
94+
</>
95+
);
96+
}

app/client/src/pages/Editor/gitSync/components/StyledComponents.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ export const Subtitle = styled.p`
99
${(props) => getTypographyByKey(props, "p3")};
1010
`;
1111

12+
export const Caption = styled.span`
13+
${(props) => getTypographyByKey(props, "h6")};
14+
`;
15+
1216
export const Space = styled.div<{ size: number; horizontal?: boolean }>`
1317
margin: ${(props) =>
1418
props.horizontal

0 commit comments

Comments
 (0)