fix: maximize file import card when git import card is not available

This commit is contained in:
haojin111 2022-03-26 23:33:10 +08:00 committed by GitHub
parent c43d680736
commit 2b862b9b3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,8 +74,8 @@ const Row = styled.div`
justify-content: space-between; justify-content: space-between;
`; `;
const FileImportCard = styled.div` const FileImportCard = styled.div<{ gitEnabled?: boolean }>`
width: 320px; width: ${(props) => (props.gitEnabled ? "320px" : "100%")};
height: 200px; height: 200px;
border: 1px solid ${Colors.GREY_4}; border: 1px solid ${Colors.GREY_4};
display: flex; display: flex;
@ -281,7 +281,10 @@ function ImportApplicationModal(props: ImportApplicationModalProps) {
</Text> </Text>
</TextWrapper> </TextWrapper>
<Row> <Row>
<FileImportCard className="t--import-json-card"> <FileImportCard
className="t--import-json-card"
gitEnabled={isGitImportFeatureEnabled}
>
<FilePickerV2 <FilePickerV2
containerClickable containerClickable
description={createMessage(IMPORT_APP_FROM_FILE_MESSAGE)} description={createMessage(IMPORT_APP_FROM_FILE_MESSAGE)}