feat(component): add CopyButtonComponent

This commit is contained in:
Paul Chavard 2022-11-29 23:43:06 +01:00 committed by Kara Diaby
parent 1efcacd845
commit 36195acb29

View file

@ -1,5 +1,5 @@
%span{ data: { controller: 'clipboard', clipboard_text_value: @text } } %span{ data: { controller: 'clipboard', clipboard_text_value: @text } }
%button{ data: { action: 'clipboard#copy' }, title: @title } %button{ data: { action: 'clipboard#copy' }, title: @title }
%span.fr-icon-clipboard-line %span.fr-icon-clipboard-line
%p.fr-text--sm.hidden{ data: { clipboard_target: 'success' } } %span.fr-text--sm.hidden{ data: { clipboard_target: 'success' } }
= @success || t('.copy_confirmation') = @success || t('.copy_confirmation')