toolbar-button.component.yml

Same filename and directory in other branches
  1. 10 core/modules/navigation/components/toolbar-button/toolbar-button.component.yml
core/modules/navigation/components/toolbar-button/toolbar-button.component.yml

File

core/modules/navigation/components/toolbar-button/toolbar-button.component.yml

View source
  1. # This is so your IDE knows about the syntax for fixes and autocomplete.
  2. $schema: https://git.drupalcode.org/project/drupal/-/raw/HEAD/core/assets/schemas/v1/metadata.schema.json
  3. # The human readable name.
  4. name: Toolbar button
  5. # Status can be: "experimental", "stable", "deprecated", "obsolete".
  6. status: experimental
  7. # Schema for the props. We support www.json-schema.org. Learn more about the
  8. # syntax there.
  9. props:
  10. # Props are always an object with keys. Each key is a variable in your
  11. # component template.
  12. type: object
  13. properties:
  14. action:
  15. type: string
  16. title: Action
  17. description: Hidden button action text.
  18. modifiers:
  19. type: array
  20. title: Modifier classes.
  21. description:
  22. Button modifiers.
  23. https://en.bem.info/methodology/css/#modifiers
  24. items:
  25. type: string
  26. enum:
  27. - collapsible
  28. - dark
  29. - expand--down
  30. - expand--side
  31. - large
  32. - non-interactive
  33. - primary
  34. - small-offset
  35. - weight--400
  36. meta:enum:
  37. collapsible: Collapsible
  38. dark: Dark
  39. expand--down: Expands down
  40. expand--side: Expands to the side
  41. large: Large
  42. non-interactive: Non-Interactive
  43. primary: Primary
  44. small-offset: Small offset
  45. weight--400: Weight 400
  46. x-translation-context: Toolbar button modifiers
  47. extra_classes:
  48. type: array
  49. title: Extra classes.
  50. description:
  51. External modifiers added from the placement context.
  52. https://en.bem.info/methodology/css/#mixes
  53. items:
  54. type: string
  55. html_tag:
  56. type: string
  57. title: HTML tag
  58. # Limit the available options by using enums.
  59. enum:
  60. - a
  61. - button
  62. - span
  63. meta:enum:
  64. a: Link
  65. button: Button
  66. span: Inline
  67. x-translation-context: HTML tag
  68. # Provide a default value
  69. default: button
  70. icon:
  71. title: Icon
  72. type: object
  73. properties:
  74. pack_id:
  75. title: Icon Pack
  76. type: string
  77. default: navigation
  78. icon_id:
  79. title: Icon ID
  80. type: string
  81. settings:
  82. title: Icon Settings
  83. type: object
  84. default:
  85. class: toolbar-button__icon
  86. size: 20
  87. required:
  88. - icon_id
  89. text:
  90. title: Text
  91. description: Text of button.
  92. type: string
  93. slots:
  94. content:
  95. title: Content
  96. description: Content of button.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.