mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 04:43:20 +03:00
chore: update quick search style (#1376)
This commit is contained in:
parent
bc9d470d08
commit
83e1cd9274
@ -96,35 +96,38 @@ export const Results: React.FC<ResultsProps> = ({
|
||||
)
|
||||
) : (
|
||||
<div>
|
||||
<Command.Group heading={t('Recently viewed')}>
|
||||
{recentlyViewed.map(recent => {
|
||||
return (
|
||||
<Command.Item
|
||||
key={recent.id}
|
||||
value={recent.id}
|
||||
onSelect={() => {
|
||||
onClose();
|
||||
router.push({
|
||||
pathname: '/workspace/[workspaceId]/[pageId]',
|
||||
query: {
|
||||
workspaceId: blockSuiteWorkspace.room,
|
||||
pageId: recent.id,
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
<StyledListItem>
|
||||
{recent.mode === 'edgeless' ? (
|
||||
<EdgelessIcon />
|
||||
) : (
|
||||
<PaperIcon />
|
||||
)}
|
||||
<span>{recent.title}</span>
|
||||
</StyledListItem>
|
||||
</Command.Item>
|
||||
);
|
||||
})}
|
||||
</Command.Group>
|
||||
{recentlyViewed.length > 0 && (
|
||||
<Command.Group heading={t('Recent')}>
|
||||
{recentlyViewed.map(recent => {
|
||||
return (
|
||||
<Command.Item
|
||||
key={recent.id}
|
||||
value={recent.id}
|
||||
onSelect={() => {
|
||||
onClose();
|
||||
router.push({
|
||||
pathname: '/workspace/[workspaceId]/[pageId]',
|
||||
query: {
|
||||
workspaceId: blockSuiteWorkspace.room,
|
||||
pageId: recent.id,
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
<StyledListItem>
|
||||
{recent.mode === 'edgeless' ? (
|
||||
<EdgelessIcon />
|
||||
) : (
|
||||
<PaperIcon />
|
||||
)}
|
||||
<span>{recent.title}</span>
|
||||
</StyledListItem>
|
||||
</Command.Item>
|
||||
);
|
||||
})}
|
||||
</Command.Group>
|
||||
)}
|
||||
|
||||
<Command.Group heading={t('Jump to')}>
|
||||
{List.map(link => {
|
||||
return (
|
||||
|
@ -8,13 +8,16 @@ export const StyledContent = styled('div')(({ theme }) => {
|
||||
overflow: 'auto',
|
||||
marginBottom: '10px',
|
||||
...displayFlex('center', 'flex-start'),
|
||||
color: theme.colors.popoverColor,
|
||||
color: theme.colors.textColor,
|
||||
transition: 'all 0.15s',
|
||||
letterSpacing: '0.06em',
|
||||
'[cmdk-group-heading]': {
|
||||
margin: '5px 16px',
|
||||
fontSize: theme.font.base,
|
||||
fontWeight: '500',
|
||||
...displayFlex('start', 'center'),
|
||||
margin: '0 16px',
|
||||
height: '36px',
|
||||
lineHeight: '22px',
|
||||
fontSize: theme.font.sm,
|
||||
color: theme.colors.secondaryTextColor,
|
||||
},
|
||||
'[aria-selected="true"]': {
|
||||
borderRadius: '5px',
|
||||
|
Loading…
Reference in New Issue
Block a user