fix(docsearch): group search button elements in containers (#74)
This commit is contained in:
parent
a8fb06305a
commit
8640418995
2 changed files with 20 additions and 6 deletions
|
|
@ -8,6 +8,7 @@
|
|||
display: flex;
|
||||
font-weight: 500;
|
||||
height: 36px;
|
||||
justify-content: space-between;
|
||||
margin: 0 0 0 16px;
|
||||
padding: 0 8px;
|
||||
user-select: none;
|
||||
|
|
@ -22,6 +23,11 @@
|
|||
outline: none;
|
||||
}
|
||||
|
||||
.DocSearch-Button-Container {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.DocSearch-Search-Icon {
|
||||
stroke-width: 1.6;
|
||||
}
|
||||
|
|
@ -35,6 +41,10 @@
|
|||
padding: 0 12px 0 6px;
|
||||
}
|
||||
|
||||
.DocSearch-Button-Keys {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.DocSearch-Button-Key {
|
||||
align-items: center;
|
||||
background: var(--docsearch-key-gradient);
|
||||
|
|
|
|||
|
|
@ -41,13 +41,17 @@ export const DocSearchButton = React.forwardRef<
|
|||
{...props}
|
||||
ref={ref}
|
||||
>
|
||||
<SearchIcon />
|
||||
<span className="DocSearch-Button-Placeholder">Search</span>
|
||||
<div className="DocSearch-Button-Container">
|
||||
<SearchIcon />
|
||||
<span className="DocSearch-Button-Placeholder">Search</span>
|
||||
</div>
|
||||
|
||||
<span className="DocSearch-Button-Key">
|
||||
{key === ACTION_KEY_DEFAULT ? <ControlKeyIcon /> : key}
|
||||
</span>
|
||||
<span className="DocSearch-Button-Key">K</span>
|
||||
<div className="DocSearch-Button-Keys">
|
||||
<span className="DocSearch-Button-Key">
|
||||
{key === ACTION_KEY_DEFAULT ? <ControlKeyIcon /> : key}
|
||||
</span>
|
||||
<span className="DocSearch-Button-Key">K</span>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue