mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 19:00:09 -04:00
15 lines
443 B
JavaScript
15 lines
443 B
JavaScript
import React from "react";
|
|
import PropTypes from "prop-types";
|
|
import { EditorPropTypes } from "@/visualizations/prop-types";
|
|
import registeredVisualizations from "@/visualizations/registeredVisualizations";
|
|
|
|
export default function Editor({ type, ...otherProps }) {
|
|
const { Editor } = registeredVisualizations[type];
|
|
return <Editor {...otherProps} />;
|
|
}
|
|
|
|
Editor.propTypes = {
|
|
type: PropTypes.string.isRequired,
|
|
...EditorPropTypes,
|
|
};
|