Content
View differences
Updated by Henriette Darge over 2 years ago
In [https://github.com/opf/openproject/pull/13866](https://github.com/opf/openproject/pull/13866) a component was introdcued to add a clipBoardCopy Button next to an input field. This should be extracted into the Primer Repository as an `InputGroup` (name taken from Github)
**Example call in a ruby file**: Example html:
```erb ```html
<%= <div class="input-group">
render Primer::OpenProject::InputGroup.new(..) do |component| <input class="form-control input-sm color-bg-subtle">
<div class="input-group-button">
# component.with_trailing_button() <clipboard-copy>
...
# component.with_leading_button() ...
component.with_clipboard_copy () ... </clipboard-copy>
</div>
%> </div>
```
**Note** that `clipboard_copy` is an own option, as it is probably the most common use case and should be consistent throughout the application. Result:
**Desired result**:
<img class="op-uc-image op-uc-image_inline" style="width:240px;" style="width:387px;" src="/api/v3/attachments/74992/content">
**Example call in a ruby file**:
```erb
<%=
render Primer::OpenProject::InputGroup.new(..) do |component|
<div class="input-group-button">
# component.with_trailing_button()
# component.with_leading_button() ...
component.with_clipboard_copy () ...
</div>
%>
```
**Note** that `clipboard_copy` is an own option, as it is probably the most common use case and should be consistent throughout the application.
**Desired result**:
<img class="op-uc-image op-uc-image_inline" style="width:240px;"