Skip to content

Commit 2ff51ad

Browse files
committed
feat: improve icons look increasing room between nodes
1 parent dfebafb commit 2ff51ad

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

src/components/LibraryItem.tsx

+9-5
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,15 @@ export class LibraryItem extends React.Component<LibraryItemProps, LibraryItemSt
159159
this.props.data.itemType !== "coregroup" &&
160160
this.props.data.itemType !== "classType" &&
161161
this.props.data.itemType !== "none") {
162-
return <img
163-
className={"LibraryItemIcon"}
164-
src={this.props.data.iconUrl}
165-
onError={this.onImageLoadFail}
166-
/>;
162+
return (
163+
<div className="LibraryItemIconWrapper">
164+
<img
165+
className={"LibraryItemIcon"}
166+
src={this.props.data.iconUrl}
167+
onError={this.onImageLoadFail}
168+
/>
169+
</div>
170+
);
167171
}
168172

169173
// If it is a section, display the icon (if given) and provide a click interaction.

src/resources/LibraryStyles.css

+10-3
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,19 @@ button {
197197
-webkit-user-drag: none;
198198
}
199199

200+
.LibraryItemContainerNone .LibraryItemIconWrapper {
201+
width: 2.5rem;
202+
height: 2.5rem;
203+
margin: 0rem 0.3rem;
204+
}
205+
200206
.LibraryItemContainerNone .LibraryItemIcon {
201207
align-self: flex-start;
202-
padding-left: 0.5rem;
208+
height: 100%;
209+
width: 100%;
210+
object-fit: scale-down;
211+
padding: 0rem;
203212
padding-right: 0.5rem;
204-
width: 2.5rem;
205-
height: 2.5rem;
206213
-webkit-user-drag: none;
207214
}
208215

0 commit comments

Comments
 (0)