-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oel 454 search block pattern #8
Conversation
label: "Action" | ||
description: 'A url for attribute action' | ||
preview: '#' | ||
additional_classes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also add additional classes for the input, the button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
additional classes for the button not available
placeholder: | ||
type: "text" | ||
label: "Search" | ||
preview: "search text" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a field "additional_elements" of type array, in case more elements need to be injected
} | ||
%} | ||
{% endif %} | ||
<form{{ attributes.addClass('search-form', 'search-block-form', additional_classes) }} action="{{ url }}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create a attributes array
{% if attributes is empty %}
{% set attributes = create_attribute() %}
{% endif %}
start adding the classes, action to it, this way if the pattern sends more then the scenario is covered
{# | ||
/** | ||
* @file | ||
* Default theme implementation for a 'form' element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Default theme implementation for a 'form' element. | |
* Default theme implementation for a 'search form' composition. |
'label': button_label, | ||
'type': 'submit', | ||
'icon': _icon, | ||
'icon_position': 'after' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make the icon position configurable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.