"Currently, I am using a drawer, but the issue is that the content inside the drawer is not responsive. I am attempting to create a wrapper for the content within the page, but I'm encountering difficulties with the CSS not functioning as expected. Could you kindly suggest an appropriate method for designing a responsive page?
========================================================================================
"I am currently using a wrapper for sharing my code, for example."<wrapper direction="column">
<row>
<div> my page code </div>
<row>
</wrapper>
==============================================================================================
import React, { ReactNode } from "react";
import styled from "styled-components";
interface WrapperOptions {
children: ReactNode;
direction?: "row" | "column";
}
const StyledWrapper = styled.div<{ direction?: string }>`
background-color: #ffffff;
width: 100%;
height: 100vh;
display: flex;
overflow: auto;
flex-direction: ${({ direction }) => direction};
`;
function Wrapper({ children, direction }: WrapperOptions) {
return (
<StyledWrapper direction={direction}>
{children}
</StyledWrapper>
);
}
export { Wrapper };