Skip to content

Commit

Permalink
fixing logo and the tootltip for title
Browse files Browse the repository at this point in the history
  • Loading branch information
LianaHus committed Sep 27, 2024
1 parent 1706926 commit c8ce241
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions apps/remix-ide/src/app/plugins/remixGuide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export class RemixGuidePlugin extends ViewPlugin {
return <RemixUIGridCell
plugin={this}
title={cell.title}
titleTooltip={cell.titleTooltip}
tagList={cell.tagList}
classList='RGCellStyle'
expandViewEl={
Expand All @@ -135,8 +136,6 @@ export class RemixGuidePlugin extends ViewPlugin {
this.videoID = cell.expandViewElement.videoID
this.renderComponent()
}}
logo={cell.expandViewElement.logo}
logoURL={"https://www.youtube.com/@" + cell.authorURL}
>
<img src={"//img.youtube.com/vi/" + cell.expandViewElement.videoID + "/0.jpg"} style={{ height: '100px', width: 'fit-content' }}></img>
</RemixUIGridCell>
Expand Down
1 change: 1 addition & 0 deletions apps/remix-ide/src/app/plugins/remixGuideData.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"cells": [
{
"title": "Intro to Remix",
"titleTooltip": "Example tooltip",
"tagList": [
"L2",
"AI"
Expand Down
7 changes: 4 additions & 3 deletions libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface RemixUIGridCellProps {
logos?: string[]
logoURL?: string
title: string
titleTooltip: string
titleTooltip?: string
hideTitle?: boolean
tagList?: string[] // max 8, others will be ignored
classList?: string
Expand Down Expand Up @@ -79,11 +79,12 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => {
<div className={ `${pinned ? "" : "border-dark "}` + "d-flex mx-0 p-2 bg-light border border-secondary remixui_grid_cell_container " + props.classList || ''} data-id={"remixUIGS" + props.title}>
<div className="d-flex remixui_grid_cell w-100 flex-column">
{ !props.hideTitle && <div className='d-flex flex-row pb-1 mb-1 align-items-end' style={{ minWidth: '8rem', height: '1rem' }}>
{ props.logo && props.logoURL !== '' ?
{ props.logo ? props.logoURL !== '' ?
<a href={props.logoURL} target="__blank">
<img className='remixui_grid_view_logo mr-1' src={props.logo} style={{ width: '1rem', height: '1rem' }}/>
</a> :
<img className='remixui_grid_view_logo mr-1' src={props.logo} style={{ width: '1rem', height: '1rem' }}/>
<img className='remixui_grid_view_logo mr-1' src={props.logo} style={{ width: '1rem', height: '1rem' }}/> :
<></>
}
{ props.logos && props.logos.map((logo) => <img className='remixui_grid_view_logo mr-1' src={logo} style={{ width: '1rem', height: '1rem' }}/>)}
{ props.title &&
Expand Down

0 comments on commit c8ce241

Please sign in to comment.