Skip to content

Commit

Permalink
feat: improve icons look increasing room between nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
EnzoBatistaU committed Apr 3, 2024
1 parent dfebafb commit 2ff51ad
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
14 changes: 9 additions & 5 deletions src/components/LibraryItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,15 @@ export class LibraryItem extends React.Component<LibraryItemProps, LibraryItemSt
this.props.data.itemType !== "coregroup" &&
this.props.data.itemType !== "classType" &&
this.props.data.itemType !== "none") {
return <img
className={"LibraryItemIcon"}
src={this.props.data.iconUrl}
onError={this.onImageLoadFail}
/>;
return (
<div className="LibraryItemIconWrapper">
<img
className={"LibraryItemIcon"}
src={this.props.data.iconUrl}
onError={this.onImageLoadFail}
/>
</div>
);
}

// If it is a section, display the icon (if given) and provide a click interaction.
Expand Down
13 changes: 10 additions & 3 deletions src/resources/LibraryStyles.css
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,19 @@ button {
-webkit-user-drag: none;
}

.LibraryItemContainerNone .LibraryItemIconWrapper {
width: 2.5rem;
height: 2.5rem;
margin: 0rem 0.3rem;
}

.LibraryItemContainerNone .LibraryItemIcon {
align-self: flex-start;
padding-left: 0.5rem;
height: 100%;
width: 100%;
object-fit: scale-down;
padding: 0rem;
padding-right: 0.5rem;
width: 2.5rem;
height: 2.5rem;
-webkit-user-drag: none;
}

Expand Down

0 comments on commit 2ff51ad

Please sign in to comment.