* widget fuzzy search POC * fix threshold * Makes fuse to initialize only once * add proper dependancy to useEffect * Adds more search terms * Adds search term for other widgets * reduce distance for better search results
35 lines
872 B
TypeScript
35 lines
872 B
TypeScript
import { DEFAULT_FONT_SIZE } from "constants/WidgetConstants";
|
|
import { OverflowTypes } from "./constants";
|
|
import IconSVG from "./icon.svg";
|
|
import Widget from "./widget";
|
|
|
|
export const CONFIG = {
|
|
type: Widget.getWidgetType(),
|
|
name: "Text",
|
|
iconSVG: IconSVG,
|
|
searchTags: ["typography", "paragraph"],
|
|
defaults: {
|
|
text: "Label",
|
|
fontSize: DEFAULT_FONT_SIZE,
|
|
fontStyle: "BOLD",
|
|
textAlign: "LEFT",
|
|
textColor: "#231F20",
|
|
truncateButtonColor: "#FFC13D",
|
|
rows: 4,
|
|
columns: 16,
|
|
widgetName: "Text",
|
|
shouldTruncate: false,
|
|
overflow: OverflowTypes.NONE,
|
|
version: 1,
|
|
animateLoading: true,
|
|
},
|
|
properties: {
|
|
derived: Widget.getDerivedPropertiesMap(),
|
|
default: Widget.getDefaultPropertiesMap(),
|
|
meta: Widget.getMetaPropertiesMap(),
|
|
config: Widget.getPropertyPaneConfig(),
|
|
},
|
|
};
|
|
|
|
export default Widget;
|