2019-09-18 10:19:50 +00:00
|
|
|
import React from "react";
|
|
|
|
|
import PropertyControlFactory from "./PropertyControlFactory";
|
|
|
|
|
import InputTextControl, {
|
|
|
|
|
InputControlProps,
|
2019-09-24 12:11:32 +00:00
|
|
|
} from "../propertyControls/InputTextControl";
|
2019-09-18 10:19:50 +00:00
|
|
|
import DropDownControl, {
|
|
|
|
|
DropDownControlProps,
|
2019-09-24 12:11:32 +00:00
|
|
|
} from "../propertyControls/DropDownControl";
|
Property Pane Controls
- Fixes #121, #122, #123, #124, #90, #46, #65, #100, #101, #68, #102
2019-10-24 05:24:45 +00:00
|
|
|
import SwitchControl, {
|
|
|
|
|
SwitchControlProps,
|
|
|
|
|
} from "../propertyControls/SwitchControl";
|
2019-09-18 10:19:50 +00:00
|
|
|
|
|
|
|
|
class PropertyControlRegistry {
|
|
|
|
|
static registerPropertyControlBuilders() {
|
|
|
|
|
PropertyControlFactory.registerControlBuilder("INPUT_TEXT", {
|
|
|
|
|
buildPropertyControl(controlProps: InputControlProps): JSX.Element {
|
|
|
|
|
return <InputTextControl {...controlProps} />;
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
PropertyControlFactory.registerControlBuilder("DROP_DOWN", {
|
|
|
|
|
buildPropertyControl(controlProps: DropDownControlProps): JSX.Element {
|
|
|
|
|
return <DropDownControl {...controlProps} />;
|
|
|
|
|
},
|
|
|
|
|
});
|
Property Pane Controls
- Fixes #121, #122, #123, #124, #90, #46, #65, #100, #101, #68, #102
2019-10-24 05:24:45 +00:00
|
|
|
PropertyControlFactory.registerControlBuilder("SWITCH", {
|
|
|
|
|
buildPropertyControl(controlProps: SwitchControlProps): JSX.Element {
|
|
|
|
|
return <SwitchControl {...controlProps} />;
|
|
|
|
|
},
|
|
|
|
|
});
|
2019-09-18 10:19:50 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default PropertyControlRegistry;
|