ProvisionerForm.tsx 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import React, { useEffect, useState, useContext } from "react";
  2. import styled from "styled-components";
  3. import aws from "assets/aws.png";
  4. import Heading from "components/form-components/Heading";
  5. import Helper from "./form-components/Helper";
  6. import ProvisionerSettings from "./ProvisionerSettings";
  7. import ProvisionerSettingsOld from "./ProvisionerSettingsOld";
  8. import Text from "./porter/Text";
  9. import Spacer from "./porter/Spacer";
  10. type Props = {
  11. goBack: () => void;
  12. credentialId: string;
  13. useAssumeRole?: boolean;
  14. };
  15. const ProvisionerForm: React.FC<Props> = ({
  16. goBack,
  17. credentialId,
  18. useAssumeRole,
  19. }) => {
  20. return (
  21. <>
  22. <Text size={16}>
  23. <BackButton width="155px" onClick={goBack}>
  24. <i className="material-icons">first_page</i>
  25. Set credentials
  26. </BackButton>
  27. <Spacer inline width="17px" />
  28. <Img src={aws} />
  29. Configure settings
  30. </Text>
  31. <Spacer y={1} />
  32. <Text color="helper">
  33. Configure settings for your AWS environment.
  34. </Text>
  35. <Spacer y={1} />
  36. <ProvisionerSettings credentialId={credentialId} />
  37. </>
  38. );
  39. };
  40. export default ProvisionerForm;
  41. const Img = styled.img`
  42. height: 18px;
  43. margin-right: 15px;
  44. `;
  45. const BackButton = styled.div`
  46. display: flex;
  47. align-items: center;
  48. justify-content: space-between;
  49. cursor: pointer;
  50. font-size: 13px;
  51. height: 35px;
  52. padding: 5px 13px;
  53. padding-right: 15px;
  54. border: 1px solid #ffffff55;
  55. border-radius: 100px;
  56. width: ${(props: { width: string }) => props.width};
  57. color: white;
  58. background: #ffffff11;
  59. :hover {
  60. background: #ffffff22;
  61. }
  62. > i {
  63. color: white;
  64. font-size: 16px;
  65. margin-right: 6px;
  66. margin-left: -2px;
  67. }
  68. `;