You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

129 lines
2.7 KiB

1 year ago
  1. {
  2. "$schema": "https://schemas.wp.org/trunk/block.json",
  3. "apiVersion": 3,
  4. "name": "core/button",
  5. "title": "Button",
  6. "category": "design",
  7. "parent": [ "core/buttons" ],
  8. "description": "Prompt visitors to take action with a button-style link.",
  9. "keywords": [ "link" ],
  10. "textdomain": "default",
  11. "attributes": {
  12. "tagName": {
  13. "type": "string",
  14. "enum": [ "a", "button" ],
  15. "default": "a"
  16. },
  17. "type": {
  18. "type": "string",
  19. "default": "button"
  20. },
  21. "textAlign": {
  22. "type": "string"
  23. },
  24. "url": {
  25. "type": "string",
  26. "source": "attribute",
  27. "selector": "a",
  28. "attribute": "href",
  29. "__experimentalRole": "content"
  30. },
  31. "title": {
  32. "type": "string",
  33. "source": "attribute",
  34. "selector": "a,button",
  35. "attribute": "title",
  36. "__experimentalRole": "content"
  37. },
  38. "text": {
  39. "type": "string",
  40. "source": "html",
  41. "selector": "a,button",
  42. "__experimentalRole": "content"
  43. },
  44. "linkTarget": {
  45. "type": "string",
  46. "source": "attribute",
  47. "selector": "a",
  48. "attribute": "target",
  49. "__experimentalRole": "content"
  50. },
  51. "rel": {
  52. "type": "string",
  53. "source": "attribute",
  54. "selector": "a",
  55. "attribute": "rel",
  56. "__experimentalRole": "content"
  57. },
  58. "placeholder": {
  59. "type": "string"
  60. },
  61. "backgroundColor": {
  62. "type": "string"
  63. },
  64. "textColor": {
  65. "type": "string"
  66. },
  67. "gradient": {
  68. "type": "string"
  69. },
  70. "width": {
  71. "type": "number"
  72. }
  73. },
  74. "supports": {
  75. "anchor": true,
  76. "align": false,
  77. "alignWide": false,
  78. "color": {
  79. "__experimentalSkipSerialization": true,
  80. "gradients": true,
  81. "__experimentalDefaultControls": {
  82. "background": true,
  83. "text": true
  84. }
  85. },
  86. "typography": {
  87. "fontSize": true,
  88. "lineHeight": true,
  89. "__experimentalFontFamily": true,
  90. "__experimentalFontWeight": true,
  91. "__experimentalFontStyle": true,
  92. "__experimentalTextTransform": true,
  93. "__experimentalTextDecoration": true,
  94. "__experimentalLetterSpacing": true,
  95. "__experimentalDefaultControls": {
  96. "fontSize": true
  97. }
  98. },
  99. "reusable": false,
  100. "shadow": true,
  101. "spacing": {
  102. "__experimentalSkipSerialization": true,
  103. "padding": [ "horizontal", "vertical" ],
  104. "__experimentalDefaultControls": {
  105. "padding": true
  106. }
  107. },
  108. "__experimentalBorder": {
  109. "color": true,
  110. "radius": true,
  111. "style": true,
  112. "width": true,
  113. "__experimentalSkipSerialization": true,
  114. "__experimentalDefaultControls": {
  115. "color": true,
  116. "radius": true,
  117. "style": true,
  118. "width": true
  119. }
  120. },
  121. "__experimentalSelector": ".wp-block-button .wp-block-button__link"
  122. },
  123. "styles": [
  124. { "name": "fill", "label": "Fill", "isDefault": true },
  125. { "name": "outline", "label": "Outline" }
  126. ],
  127. "editorStyle": "wp-block-button-editor",
  128. "style": "wp-block-button"
  129. }