mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 09:21:24 +08:00
feat: update quick search ui
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import React from 'react';
|
||||
import { Command, useCommandState } from 'cmdk';
|
||||
|
||||
const noResult = () => {
|
||||
const search = useCommandState(state => state.search);
|
||||
return <Command.Empty>No results found for "{search}".</Command.Empty>;
|
||||
};
|
||||
|
||||
export default noResult;
|
||||
@@ -0,0 +1,21 @@
|
||||
import React from 'react';
|
||||
import NoResult from './NotFound';
|
||||
import { Command } from 'cmdk';
|
||||
import Store from '@blocksuite/store';
|
||||
|
||||
const SearchResult = () => {
|
||||
return (
|
||||
<>
|
||||
<NoResult />
|
||||
<Command.Group heading="Letters">
|
||||
<Command.Item>a</Command.Item>
|
||||
<Command.Item>b</Command.Item>
|
||||
<Command.Separator />
|
||||
<Command.Item>c</Command.Item>
|
||||
</Command.Group>
|
||||
<Command.Item>Apple</Command.Item>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default SearchResult;
|
||||
Reference in New Issue
Block a user