Skip to content

Commit

Permalink
minimum sizes for cells
Browse files Browse the repository at this point in the history
  • Loading branch information
LianaHus committed Jul 11, 2024
1 parent e0f3591 commit 71455c0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion apps/remix-ide/src/app/providers/environment-explorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { PluginViewWrapper } from '@remix-ui/helper'
import { RemixUIGridView } from '@remix-ui/remix-ui-grid-view'
import { RemixUIGridSection } from '@remix-ui/remix-ui-grid-section'
import { RemixUIGridCell } from '@remix-ui/remix-ui-grid-cell'
import './style/environment-explorer.css'
import type { Provider } from '../../blockchain/blockchain'

import * as packageJson from '../../../../../package.json'
Expand Down Expand Up @@ -106,7 +107,7 @@ export class EnvironmentExplorer extends ViewPlugin {
return <RemixUIGridCell
plugin={this}
title={provider.name}

classList='EECellStyle'
pinned={this.pinnedProviders.includes(provider.name)}
pinStateCallback={async (pinned: boolean) => {
if (pinned) {
Expand Down Expand Up @@ -135,6 +136,7 @@ export class EnvironmentExplorer extends ViewPlugin {
return <RemixUIGridCell
plugin={this}
title={provider.name}
classList='EECellStyle'
pinned={this.pinnedProviders.includes(provider.name)}
pinStateCallback={async (pinned: boolean) => {
if (pinned) {
Expand Down Expand Up @@ -162,6 +164,7 @@ export class EnvironmentExplorer extends ViewPlugin {
return <RemixUIGridCell
plugin={this}
title={provider.name}
classList='EECellStyle'
pinned={this.pinnedProviders.includes(provider.name)}
pinStateCallback={async (pinned: boolean) => {
if (pinned) {
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide/src/remixAppManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export function isNative(name) {
'circuit-compiler',
'compilationDetails',
'vyperCompilationDetails',
'remixGuide',
//'remixGuide',
'walletconnect'
]
return nativePlugins.includes(name) || requiredModules.includes(name) || isInjectedProvider(name) || isVM(name)
Expand Down
5 changes: 3 additions & 2 deletions libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
.remixui_grid_cell_pin:focus {
outline: none;
}

.remixui_grid_cell_pin {
width: 1rem;
height: 1rem;
position: relative;
right: 0.2rem;
top: -4.2rem;
right: 1rem;
top: -0.8rem;
background: transparent;
}

Expand Down
2 changes: 1 addition & 1 deletion libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => {
{ filterCon.showPin && <button
className={`${pinned ? 'fa-duotone' : 'fa-light'}` + ` fa-map-pin text-info border-0 mb-0 remixui_grid_cell_pin`}
style={{ fontSize: 'large' }}
onClick={() => {
onClick={async () => {
if (!props.pinStateCallback) setPinned(!pinned)
if (await props.pinStateCallback(!pinned)) setPinned(!pinned)
}}
Expand Down

0 comments on commit 71455c0

Please sign in to comment.