index.tsx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import React from "react";
  2. import { Sidebar } from "src/components/Sidebar";
  3. import styled from "styled-components";
  4. import { JsonEditor } from "./JsonEditor";
  5. import { LiveEditor } from "./LiveEditor";
  6. const StyledPageWrapper = styled.div`
  7. display: flex;
  8. width: 100%;
  9. `;
  10. const StyledEditorWrapper = styled.div`
  11. width: 100%;
  12. `;
  13. const StyledTools = styled.div`
  14. display: flex;
  15. align-items: center;
  16. height: 36px;
  17. border: 1px solid ${({ theme }) => theme.BLACK};
  18. padding: 4px 16px;
  19. background: ${({ theme }) => theme.BLACK_SECONDARY};
  20. color: ${({ theme }) => theme.SILVER};
  21. `;
  22. const StyledEditor = styled.div`
  23. display: flex;
  24. background: ${({ theme }) => theme.BLACK_LIGHT};
  25. border: 1px solid ${({ theme }) => theme.BLACK};
  26. border-top: none;
  27. height: calc(100vh - 48px);
  28. `;
  29. const Editor: React.FC = () => {
  30. return (
  31. <StyledPageWrapper>
  32. <Sidebar />
  33. <StyledEditorWrapper>
  34. <StyledTools>Tools</StyledTools>
  35. <StyledEditor>
  36. <JsonEditor />
  37. <LiveEditor />
  38. </StyledEditor>
  39. </StyledEditorWrapper>
  40. </StyledPageWrapper>
  41. );
  42. };
  43. export default Editor;