fix lint issues

This commit is contained in:
Vladyslav Matsiiako
2025-02-25 17:30:15 +09:00
parent ab4b6c17b3
commit 6e590a78a0
@@ -629,24 +629,39 @@ export const SecretDetailSidebar = ({
> >
{secretValue} {secretValue}
</span> </span>
<FontAwesomeIcon <button
icon={faEyeSlash} type="button"
className="ml-1 cursor-pointer" className="ml-1 cursor-pointer"
onClick={(e) => { onClick={(e) => {
e.stopPropagation(); e.stopPropagation();
e.currentTarget.closest('.group')?.classList.remove('show-value'); e.currentTarget.closest('.group')?.classList.remove('show-value');
}} }}
/> onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.stopPropagation();
e.currentTarget.closest('.group')?.classList.remove('show-value');
}
}}
>
<FontAwesomeIcon icon={faEyeSlash} />
</button>
</div> </div>
<span className="group-[.show-value]:hidden"> <span className="group-[.show-value]:hidden">
{secretValue?.replace(/./g, '*')} {secretValue?.replace(/./g, '*')}
<FontAwesomeIcon <button
icon={faEye} type="button"
className="ml-1 cursor-pointer" className="ml-1 cursor-pointer"
onClick={(e) => { onClick={(e) => {
e.currentTarget.closest('.group')?.classList.add('show-value'); e.currentTarget.closest('.group')?.classList.add('show-value');
}} }}
/> onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.currentTarget.closest('.group')?.classList.add('show-value');
}
}}
>
<FontAwesomeIcon icon={faEye} />
</button>
</span> </span>
</div> </div>
</div> </div>