Add TOTP field support and restructured ItemFieldValues components

This commit is contained in:
aet
2022-02-21 02:55:35 -05:00
parent ac8745dbdc
commit 16575b6739
17 changed files with 271 additions and 162 deletions

View File

@ -0,0 +1,19 @@
import { useItemFieldContextMenu } from "../ItemFieldContextMenu"
import { Container } from "./Container"
import { useCopy } from "./hooks"
export const TextView: React.FC<{ value: string }> = ({ value }) => {
const { onRightClick, ContextMenuContainer, Item } = useItemFieldContextMenu()
const onCopy = useCopy(value)
return (
<>
<Container onContextMenu={onRightClick} onClick={onCopy}>
{value}
</Container>
<ContextMenuContainer>
<Item onClick={onCopy}>Copier</Item>
</ContextMenuContainer>
</>
)
}