-
-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
86 additions
and
218 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react'; | ||
import AxesWidget from './axes'; | ||
import ConnectionWidget from './connection'; | ||
import ConsoleWidget from './console'; | ||
import GCodeWidget from './gcode'; | ||
import GrblWidget from './grbl'; | ||
import ProbeWidget from './probe'; | ||
import SpindleWidget from './spindle'; | ||
import VisualizerWidget from './visualizer'; | ||
import WebcamWidget from './webcam'; | ||
|
||
const Widget = (props) => { | ||
const { widgetid, ...others } = props; | ||
const widget = { | ||
'axes': () => <AxesWidget data-widgetid={widgetid} {...others} />, | ||
'connection': () => <ConnectionWidget data-widgetid={widgetid} {...others} />, | ||
'console': () => <ConsoleWidget data-widgetid={widgetid} {...others} />, | ||
'gcode': () => <GCodeWidget data-widgetid={widgetid} {...others} />, | ||
'grbl': () => <GrblWidget data-widgetid={widgetid} {...others} />, | ||
'probe': () => <ProbeWidget data-widgetid={widgetid} {...others} />, | ||
'spindle': () => <SpindleWidget data-widgetid={widgetid} {...others} />, | ||
'visualizer': () => <VisualizerWidget data-widgetid={widgetid} {...others} />, | ||
'webcam': () => <WebcamWidget data-widgetid={widgetid} {...others} /> | ||
}[widgetid]; | ||
|
||
return widget ? widget() : null; | ||
}; | ||
|
||
export default Widget; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.