toolbar-button.component.yml

Same filename 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. extra_classes:
  37. type: array
  38. title: Extra classes.
  39. description:
  40. External modifiers added from the placement context.
  41. https://en.bem.info/methodology/css/#mixes
  42. items:
  43. type: string
  44. html_tag:
  45. type: string
  46. title: HTML tag
  47. # Limit the available options by using enums.
  48. enum:
  49. - a
  50. - button
  51. - span
  52. # Provide a default value
  53. default: button
  54. icon:
  55. title: Icon
  56. type: string
  57. text:
  58. title: Text
  59. description: Text of button.
  60. type: string
  61. slots:
  62. content:
  63. title: Content
  64. description: Content of button.

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