mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-15 09:40:57 +00:00
UX improvement: Create space disabled when input value is ''
This commit is contained in:
parent
7b5f26e54e
commit
75940c1936
1 changed files with 8 additions and 1 deletions
|
|
@ -57,8 +57,15 @@ const ComboboxWithCreate: React.FC<ComboboxWithCreateProps> = ({
|
|||
type="button"
|
||||
onClick={async () => onSubmit(inputValue)}
|
||||
variant="link"
|
||||
disabled={inputValue.length === 0}
|
||||
>
|
||||
{createNewMessage} "{inputValue}"
|
||||
{inputValue.length > 0 ? (
|
||||
<>
|
||||
{createNewMessage} "{inputValue}"
|
||||
</>
|
||||
) : (
|
||||
<>Create a space by typing here</>
|
||||
)}
|
||||
</Button>
|
||||
<p>Start by creating a space and adding content to it</p>
|
||||
</CommandEmpty>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue