Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | import type React from "react" import styled from "styled-components" interface ChatLayoutProps { isHidden: boolean children: React.ReactNode } /** * Main layout container for the chat view * Provides the fixed positioning and flex layout structure */ export const ChatLayout: React.FC<ChatLayoutProps> = ({ isHidden, children }) => { return ( <ChatLayoutContainer isHidden={isHidden}> <MainContent>{children}</MainContent> </ChatLayoutContainer> ) } const ChatLayoutContainer = styled.div.withConfig({ shouldForwardProp: (prop) => !["isHidden"].includes(prop), })<{ isHidden: boolean }>` display: ${(props) => (props.isHidden ? "none" : "grid")}; grid-template-rows: 1fr auto; overflow: hidden; padding: 0; margin: 0; width: 100%; height: 100%; min-height: 100vh; position: relative; ` const MainContent = styled.div` display: flex; flex-direction: column; overflow: hidden; grid-row: 1; ` |