Files
ubicloud/views/components/revealable_content.erb
Burak Yucesoy 58fec2dec7 Add click to reveal component to display sensitive info in UI
This works similar to copieble content. We place an icon next to hidden content
and when it is clicked, we reveal the content. As an option, revealed content
can be make copieble if copieble parameter is passed as true,
2023-11-13 13:54:11 +01:00

11 lines
425 B
Plaintext

<span class="revealable-content">
<span class="shadow-content flex items-center">
●●●●●●
<img src="/icons/hero-eye.svg" width="18px" class="reveal-button inline-block cursor-pointer ms1"/>
</span>
<span class="revealed-content hidden flex items-center">
<%= content %>
<img src="/icons/hero-eye-slash.svg" width="18px" class="hide-button inline-block cursor-pointer ms1"/>
</span>
</span>