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:
parent
79f57c9826
commit
d07410b78e
@ -90,7 +90,6 @@ export class EntitySettings extends React.Component<Props> {
|
|||||||
title={this.entity.metadata.name}
|
title={this.entity.metadata.name}
|
||||||
source={this.entity.metadata.source}
|
source={this.entity.metadata.source}
|
||||||
src={this.entity.spec.icon?.src}
|
src={this.entity.spec.icon?.src}
|
||||||
interactive={false}
|
|
||||||
/>
|
/>
|
||||||
<h2>{this.entity.metadata.name}</h2>
|
<h2>{this.entity.metadata.name}</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -45,7 +45,6 @@ export interface HotbarIconProps extends DOMAttributes<HTMLElement> {
|
|||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
size?: number;
|
size?: number;
|
||||||
background?: string;
|
background?: string;
|
||||||
interactive?: boolean;
|
|
||||||
tooltip?: string;
|
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 { uid, title, src, material, active, className, source, disabled, onMenuOpen, onClick, children, ...rest } = props;
|
||||||
const id = `hotbarIcon-${uid}`;
|
const id = `hotbarIcon-${uid}`;
|
||||||
const [menuOpen, setMenuOpen] = useState(false);
|
const [menuOpen, setMenuOpen] = useState(false);
|
||||||
@ -81,7 +80,7 @@ export const HotbarIcon = observer(({menuItems = [], size = 40, interactive = tr
|
|||||||
{...rest}
|
{...rest}
|
||||||
title={title}
|
title={title}
|
||||||
colorHash={`${title}-${source}`}
|
colorHash={`${title}-${source}`}
|
||||||
className={cssNames(active ? "active" : "default", { interactive })}
|
className={cssNames(active ? "active" : "default", { interactive: !!onClick })}
|
||||||
width={size}
|
width={size}
|
||||||
height={size}
|
height={size}
|
||||||
src={src}
|
src={src}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user