|
| 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)} </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)} </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 | +} |
0 commit comments