Skip to content

Commit

Permalink
Improve link&tree search input
Browse files Browse the repository at this point in the history
  • Loading branch information
ubbn committed Dec 14, 2023
1 parent f0b28a9 commit 63381ff
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
7 changes: 6 additions & 1 deletion frontend/src/components/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ const Home = () => {
It is based on the spaced repitition, a science-backed method to learn
or memorize anything for desired period of time with very little effort.
Read more about it on{" "}
<a href="https://en.wikipedia.org/wiki/Spaced_repetition">wikipedia</a>
<a
target="blank"
href="https://en.wikipedia.org/wiki/Spaced_repetition"
>
wikipedia
</a>
</p>
<p>
Start learn <a onClick={() => navigate("/learn")}>now</a>
Expand Down
14 changes: 9 additions & 5 deletions frontend/src/components/neuron/tree/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,15 @@ const _Tree: React.FC = () => {

return (
<div>
<Search
value={searchValue}
placeholder={`Search categories`}
onChange={(e) => onSearch(e.target.value)}
/>
<div style={{ marginRight: 8 }}>
<Search
value={searchValue}
allowClear
placeholder={`Search categories`}
onChange={(e) => onSearch(e.target.value)}
enterButton={<button style={{ display: "none" }} />}
/>
</div>
<div>
<Tooltip text="Add category">
<Button
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ code {
.site-tree-search-value {
color: #f50;
}

/* To show border after hiding search button from antd Search Input */
.ant-input-search .ant-input-affix-wrapper {
border-right-width: 2px;
}

0 comments on commit 63381ff

Please sign in to comment.