PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.5
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.5
4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 All 203 releases
betterdocs / react-src / gutenberg / blocks / feedback-form / src / attributes.js

attributes.js in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.9.5, at react-src/gutenberg/blocks/feedback-form/src/attributes.js

105 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from "@wordpress/i18n";
2 import {
3 generateTypographyAttributes,
4 generateDimensionsAttributes,
5 generateResponsiveRangeAttributes,
6 } from "../../../util/helpers";
7 import {
8 FORM_BUTTON_PADDING,
9 ICON_SIZE,
10 FORM_WIDTH,
11 FORM_HEIGHT,
12 FORM_BUTTON_WIDTH,
13 } from "./constants";
14 import * as typoPrefixs from "./typographyPrefixConstants";
15
16 const objAttributes = {
17 resOption: {
18 type: "string",
19 default: "Desktop",
20 },
21 // blockId attribute for making unique className and other uniqueness ⬇
22 blockId: {
23 type: "string",
24 },
25 blockRoot: {
26 type: "string",
27 default: "better_docs",
28 },
29 // blockMeta is for keeping all the styles ⬇
30 blockMeta: {
31 type: "object",
32 },
33 feedbackFormNameLabelText:{
34 type:"string",
35 default:__('Name:', 'betterdocs')
36 },
37 feedbackFormEmailLabelText:{
38 type:"string",
39 default:__( 'Email:', 'betterdocs' )
40 },
41 feedbackFormMessageLabelText:{
42 type:"string",
43 default:__( 'Message:', 'betterdocs' )
44 },
45 formContent: {
46 type: "string",
47 default: __("Still stuck? How can we help?", 'betterdocs'),
48 },
49 formTitle: {
50 type: "string",
51 default: __("How can we help?", 'betterdocs'),
52 },
53 buttonText: {
54 type: "string",
55 default: "Submit",
56 },
57 formContentColor: {
58 type: "string",
59 default: "#566e8b",
60 },
61 iconColor: {
62 type: "string",
63 default: "00ffffff",
64 },
65 feedbackFormHeadingColor: {
66 type: "string",
67 default: "#000000",
68 },
69 feedbackFormHeadingAlignment: {
70 type: "string",
71 default: "left",
72 },
73 feedbackFormLabelColor: {
74 type: "string",
75 default: "#7e8da2",
76 },
77 feedbackFormButtonBackColor: {
78 type: "string",
79 default: "#528ffe",
80 },
81 feedbackFormButtonTextColor: {
82 type: "string",
83 default: "#fff",
84 },
85 feedbackFormButtonAlignment: {
86 type: "string",
87 default: "left",
88 },
89 ...generateTypographyAttributes(Object.values(typoPrefixs)),
90 ...generateDimensionsAttributes(FORM_BUTTON_PADDING),
91 ...generateResponsiveRangeAttributes(ICON_SIZE, {
92 defaultRange: 26,
93 }),
94 ...generateResponsiveRangeAttributes(FORM_WIDTH, {
95 defaultRange: 500,
96 }),
97 ...generateDimensionsAttributes(FORM_HEIGHT, {
98 defaultRange: 1,
99 }),
100 ...generateDimensionsAttributes(FORM_BUTTON_WIDTH, {
101 defaultRange: 1,
102 }),
103 };
104 export default objAttributes;
105