Pluggable widget icon error

1
I am creating a custom button and using floating action button as starting point. The pluggable widget compiles fine, but when in mendix studio I get below error for icon – do I need to add/import a package?: the code is as below: import { Icon } from "mendix/components/native/Icon"; export interface MyButtonProps { icon?: any; } const defaultIconSource = { type: "glyph", iconClass: "glyphicon-plus" } as const; const defaultActiveIconSource = { type: "glyph", iconClass: "glyphicon-remove" } as const; export class MyButton extends Component<MyButtonProps> { private readonly renderIconHandler = this.renderIcon.bind(this); render(): ReactNode { return <ActionButton renderIcon={this.renderIconHandler}> </ActionButton>;; } private renderIcon(): JSX.Element { const { icon } = this.props; const iconSource = icon && icon.value ? icon.value : defaultIconSource; const isActive = true; const source = isActive ? defaultActiveIconSource : iconSource; const style = isActive ? { transform: [{ rotate: "-180deg" }] } : {}; return ( <View style={style}> <Icon icon={source} /> </View> ); } } GET http://localhost:8084/mxclientsystem/mendix/components/native/Icon.js?637164105037584185 net::ERR_ABORTED 404 (Not Found) mxui.js?637164105037584185:73 Error: scriptError: http://localhost:8084/mxclientsystem/mendix/components/native/Icon.js?637164105037584185 at d (mxui.js?637164105037584185:5) at HTMLScriptElement.<anonymous> (mxui.js?637164105037584185:5) mxui.js?637164105037584185:73 Loading module failed! Check console log for more detailed debug information.  
asked
0 answers