Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/client/src/components/ads/NumberedStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Container = styled.div`
`;

const Line = styled.div`
width: 2px;
width: 1px;
flex: 1;
background-color: ${(props) => props.theme.colors.numberedStep.line};
`;
Expand Down
3 changes: 3 additions & 0 deletions app/client/src/constants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,3 +445,6 @@ export const CONNECT = () => "Connect";
export const DEPLOY_TO_CLOUD = () => "Deploy to cloud";
export const DEPLOY_WITHOUT_GIT = () =>
"Deploy your application without version control";
export const DEPLOY_YOUR_APPLICATION = () => "Deploy your application";
export const COMMIT = () => "COMMIT";
export const PUSH = () => "PUSH";
96 changes: 96 additions & 0 deletions app/client/src/pages/Editor/gitSync/Deploy/Commit.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import React from "react";
import { Title, Caption } from "../components/StyledComponents";
import {
DEPLOY_YOUR_APPLICATION,
COMMIT,
PUSH,
createMessage,
} from "constants/messages";
import styled from "styled-components";

import NumberedStep from "components/ads/NumberedStep";
import OptionSelector from "../components/OptionSelector";
import { noop } from "lodash";
import TextInput from "components/ads/TextInput";
import Button, { Size } from "components/ads/Button";

const Section = styled.div`
display: flex;
margin-bottom: ${(props) => props.theme.spaces[11]}px;
`;

const Row = styled.div`
display: flex;
align-items: center;
`;

const NumberedStepContainer = styled.div`
padding-top: ${(props) => `${props.theme.spaces[3] + 1}px`};
padding-right: ${(props) => `${props.theme.spaces[11]}px`};
`;

const Gutter = styled.div`
height: ${(props) => props.theme.spaces[3]}px;
`;

// mock data
const options = [
{ label: "Master", value: "master" },
{ label: "Feature/new-feature", value: "Feature/new-feature" },
];

export default function Commit() {
return (
<>
<Title>{createMessage(DEPLOY_YOUR_APPLICATION)}</Title>
<Section>
<NumberedStepContainer>
<NumberedStep current={1} total={2} />
</NumberedStepContainer>
<div>
<Row>
<Caption>{createMessage(COMMIT)}&nbsp;</Caption>
<OptionSelector
onSelect={noop}
options={options}
selected={{
label: "Feature/new-feature",
value: "Feature/new-feature",
}}
/>
</Row>
<TextInput defaultValue="Initial Commit" />
<Gutter />
<Button
size={Size.medium}
text={createMessage(COMMIT)}
width="max-content"
/>
</div>
</Section>
<Section>
<NumberedStepContainer>
<NumberedStep current={2} total={2} />
</NumberedStepContainer>
<div>
<Row>
<Caption>{createMessage(PUSH)}&nbsp;</Caption>
<OptionSelector
onSelect={noop}
options={options}
selected={{
label: "Feature/new-feature",
value: "Feature/new-feature",
}}
/>
</Row>
<Button
size={Size.medium}
text={createMessage(PUSH)}
width="max-content"
/>
</div>
</Section>
</>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export const Subtitle = styled.p`
${(props) => getTypographyByKey(props, "p3")};
`;

export const Caption = styled.span`
${(props) => getTypographyByKey(props, "h6")};
`;

export const Space = styled.div<{ size: number; horizontal?: boolean }>`
margin: ${(props) =>
props.horizontal
Expand Down