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,12 @@
import type { ItemSection } from "opvault.js"
import { parseMonthYear } from "../../utils"
import { Container } from "./Container"
export const MonthYear: React.FC<{ field: ItemSection.MonthYear }> = ({ field }) => {
const { year, month } = parseMonthYear(field.v)
return (
<Container>
{month.toString().padStart(2, "0")}/{year.toString().padStart(4, "0")}
</Container>
)
}