fix: width of cmd-item button on quick-search modal (#2273)

This commit is contained in:
Fangdun Tsai
2023-05-09 10:13:11 +08:00
committed by GitHub
parent 11d1d773ff
commit cba3293326
2 changed files with 22 additions and 24 deletions

View File

@@ -159,15 +159,7 @@ export const QuickSearchModal: React.FC<QuickSearchModalProps> = ({
<StyledContent <StyledContent
style={{ display: isPublicAndNoQuery() ? 'none' : '' }} style={{ display: isPublicAndNoQuery() ? 'none' : '' }}
> >
{!isPublicWorkspace ? ( {isPublicWorkspace ? (
<Results
query={query}
onClose={handleClose}
router={router}
blockSuiteWorkspace={blockSuiteWorkspace}
setShowCreatePage={setShowCreatePage}
/>
) : (
<PublishedResults <PublishedResults
blockSuiteWorkspace={blockSuiteWorkspace} blockSuiteWorkspace={blockSuiteWorkspace}
query={query} query={query}
@@ -176,22 +168,28 @@ export const QuickSearchModal: React.FC<QuickSearchModalProps> = ({
setPublishWorkspaceName={setPublishWorkspaceName} setPublishWorkspaceName={setPublishWorkspaceName}
data-testid="published-search-results" data-testid="published-search-results"
/> />
) : (
<Results
query={query}
onClose={handleClose}
router={router}
blockSuiteWorkspace={blockSuiteWorkspace}
setShowCreatePage={setShowCreatePage}
/>
)} )}
</StyledContent> </StyledContent>
{!isPublicWorkspace ? ( {isPublicWorkspace ? null : showCreatePage ? (
showCreatePage ? ( <>
<> <StyledModalDivider />
<StyledModalDivider /> <StyledModalFooter>
<StyledModalFooter> <Footer
<Footer query={query}
query={query} onClose={handleClose}
onClose={handleClose} blockSuiteWorkspace={blockSuiteWorkspace}
blockSuiteWorkspace={blockSuiteWorkspace} router={router}
router={router} />
/> </StyledModalFooter>
</StyledModalFooter> </>
</>
) : null
) : null} ) : null}
</Command.List> </Command.List>
</Command> </Command>

View File

@@ -161,7 +161,7 @@ export const StyledModalFooterContent = styled('button')(() => {
}); });
export const StyledListItem = styled('button')(() => { export const StyledListItem = styled('button')(() => {
return { return {
// width: '612px', width: '100%',
height: '32px', height: '32px',
fontSize: 'inherit', fontSize: 'inherit',
color: 'inherit', color: 'inherit',