Skip to content

Json components height #1091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Aug 8, 2024
Prev Previous commit
Next Next commit
scrollbar added
  • Loading branch information
MenamAfzal committed Aug 6, 2024
commit 6f6668411923f1b00bd73bcc7931bd1e9ff121e8
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ import { AutoHeightControl } from "@lowcoder-ee/index.sdk";
* JsonEditor Comp
*/

const Wrapper = styled.div<{$height:boolean}>`
const Wrapper = styled.div<{$height: boolean}>`
background-color: #fff;
border: 1px solid #d7d9e0;
border-radius: 4px;
overflow: auto;
height: ${props=>props.$height?'100%':'300px'};
overflow: scroll;
height: ${(props) => (props.$height ? '100%' : '300px')};
&::-webkit-scrollbar {
width: 16px;
display:block !important;
}
`;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,19 @@ const bgColorMap = {
const JsonExplorerContainer = styled.div<{
$theme: keyof typeof bgColorMap;
$animationStyle: AnimationStyleType;
$height: boolean
$height: boolean;
}>`
${(props) => props.$animationStyle}
height: ${props => props.$height ?'100%':'300px'};
height: ${(props) => (props.$height ? '100%' : '300px')};
overflow-y: scroll;
background-color: ${(props) => bgColorMap[props.$theme] || "#ffffff"};
background-color: ${(props) => bgColorMap[props.$theme] || '#ffffff'};
border: 1px solid #d7d9e0;
border-radius: 4px;
padding: 10px;
&::-webkit-scrollbar {
width: 16px;
display: block !important;
}
`;

let JsonExplorerTmpComp = (function () {
Expand Down