UNPKG

@wordpress/block-library

Version:
81 lines (80 loc) 2.31 kB
import { __ } from "@wordpress/i18n"; const variations = [ { name: "text", title: __("Text Input"), icon: "edit-page", description: __("A generic text input."), attributes: { type: "text" }, isDefault: true, scope: ["inserter", "transform"], isActive: (blockAttributes) => !blockAttributes?.type || blockAttributes?.type === "text" }, { name: "textarea", title: __("Textarea Input"), icon: "testimonial", description: __( "A textarea input to allow entering multiple lines of text." ), attributes: { type: "textarea" }, isDefault: true, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes?.type === "textarea" }, { name: "checkbox", title: __("Checkbox Input"), description: __("A simple checkbox input."), icon: "forms", attributes: { type: "checkbox", inlineLabel: true }, isDefault: true, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes?.type === "checkbox" }, { name: "email", title: __("Email Input"), icon: "email", description: __("Used for email addresses."), attributes: { type: "email" }, isDefault: true, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes?.type === "email" }, { name: "url", title: __("URL Input"), icon: "admin-site", description: __("Used for URLs."), attributes: { type: "url" }, isDefault: true, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes?.type === "url" }, { name: "tel", title: __("Telephone Input"), icon: "phone", description: __("Used for phone numbers."), attributes: { type: "tel" }, isDefault: true, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes?.type === "tel" }, { name: "number", title: __("Number Input"), icon: "edit-page", description: __("A numeric input."), attributes: { type: "number" }, isDefault: true, scope: ["inserter", "transform"], isActive: (blockAttributes) => blockAttributes?.type === "number" } ]; var variations_default = variations; export { variations_default as default }; //# sourceMappingURL=variations.js.map