1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Removing explicit interactive prop

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-06-29 09:35:48 +03:00
parent 79f57c9826
commit d07410b78e
2 changed files with 2 additions and 4 deletions

View File

@ -90,7 +90,6 @@ export class EntitySettings extends React.Component<Props> {
title={this.entity.metadata.name}
source={this.entity.metadata.source}
src={this.entity.spec.icon?.src}
interactive={false}
/>
<h2>{this.entity.metadata.name}</h2>
</div>

View File

@ -45,7 +45,6 @@ export interface HotbarIconProps extends DOMAttributes<HTMLElement> {
disabled?: boolean;
size?: number;
background?: string;
interactive?: boolean;
tooltip?: string;
}
@ -66,7 +65,7 @@ function onMenuItemClick(menuItem: CatalogEntityContextMenu) {
}
}
export const HotbarIcon = observer(({menuItems = [], size = 40, interactive = true, tooltip, ...props}: HotbarIconProps) => {
export const HotbarIcon = observer(({menuItems = [], size = 40, tooltip, ...props}: HotbarIconProps) => {
const { uid, title, src, material, active, className, source, disabled, onMenuOpen, onClick, children, ...rest } = props;
const id = `hotbarIcon-${uid}`;
const [menuOpen, setMenuOpen] = useState(false);
@ -81,7 +80,7 @@ export const HotbarIcon = observer(({menuItems = [], size = 40, interactive = tr
{...rest}
title={title}
colorHash={`${title}-${source}`}
className={cssNames(active ? "active" : "default", { interactive })}
className={cssNames(active ? "active" : "default", { interactive: !!onClick })}
width={size}
height={size}
src={src}