Skip to content

Commit

Permalink
refactor: Remove duplicate components (#915)
Browse files Browse the repository at this point in the history
* refactor: remove duplicate components and core files from events-committee and refer to devhub

* fix: DropDownWithSearch path

* fix: another broken link
  • Loading branch information
Tguntenaar authored Aug 8, 2024
1 parent 4af0f4d commit 103a9e2
Show file tree
Hide file tree
Showing 43 changed files with 78 additions and 2,168 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const {
searchByLabel,
searchByValue,
onSearch,
disabled,
} = props;

const [searchTerm, setSearchTerm] = useState("");
Expand Down Expand Up @@ -113,25 +114,41 @@ const Container = styled.div`
overflow: hidden;
white-space: normal;
}
.disabled {
background-color: #f8f8f8 !important;
cursor: not-allowed !important;
border-radius: 5px;
opacity: inherit !important;
}
.disabled.dropdown-toggle::after {
display: none !important;
}
`;
let searchFocused = false;
return (
<Container>
<div
className="custom-select"
className="custom-select w-100"
tabIndex="0"
onBlur={() => {
setTimeout(() => {
setIsOpen(searchFocused || false);
}, 0);
}}
>
<div className="dropdown-toggle bg-white border rounded-2 btn drop-btn">
<div
className={
"dropdown-toggle bg-white border rounded-2 btn drop-btn w-100 " +
(disabled ? "disabled" : "")
}
>
<div
className={`selected-option w-100 text-wrap ${
selectedOption.label === defaultLabel ? "text-muted" : ""
}`}
onClick={toggleDropdown}
onClick={!disabled && toggleDropdown}
>
{selectedOption.label}
</div>
Expand Down
29 changes: 0 additions & 29 deletions instances/events-committee.near/widget/core/lib/common.jsx

This file was deleted.

35 changes: 0 additions & 35 deletions instances/events-committee.near/widget/core/lib/data-request.jsx

This file was deleted.

32 changes: 0 additions & 32 deletions instances/events-committee.near/widget/core/lib/stringUtils.jsx

This file was deleted.

126 changes: 0 additions & 126 deletions instances/events-committee.near/widget/core/lib/struct.jsx

This file was deleted.

51 changes: 0 additions & 51 deletions instances/events-committee.near/widget/core/lib/url.jsx

This file was deleted.

17 changes: 0 additions & 17 deletions instances/events-committee.near/widget/core/lib/uuid.jsx

This file was deleted.

Loading

0 comments on commit 103a9e2

Please sign in to comment.