Problem/Motivation

The Image Button documentation doesn't explain how to use this component.

Proposed resolution

Document the Image Button properties.
Provide an example of use.

CommentFileSizeAuthor
#2 image-button-docs-2710287-2.patch669 bytesdagmar

Comments

dagmar created an issue. See original summary.

dagmar’s picture

Status: Active » Needs review
StatusFileSize
new669 bytes

Here is the patch.

jhodgdon’s picture

Status: Needs review » Needs work

Thanks! I think we need to work on the wording a bit though...

+++ b/core/lib/Drupal/Core/Render/Element/ImageButton.php
@@ -8,6 +8,17 @@
+ * - #src: The image path to be shown on the button.

We aren't actually showing the image path on the button, but the image itself. So something like "The path to the image to be shown on the button" would be better.

But it looks like what is being put in there (from this example) is not a path, but a full URI.

So this needs to be clarified. If it must be a URI, we should say that. If other things like paths are accepted, we should say that.

jhodgdon’s picture

Status: Needs work » Closed (duplicate)

Oh. Actually this issue is a duplicate of #2599742: Document several form elements that have no docs.