import Examples from "../components/src/Examples"; import * as T from "../types"; const spellingOptions: { value: T.TextOptions["spelling"], label: string, }[] = [ { value: "Afghan", label: "Afghan", }, { value: "Pakistani ي", label: "Pakistani ي", }, { value: "Pakistani ی", label: "Pakistani ی", }, ]; const phoneticsOptions: { value: T.TextOptions["phonetics"], label: string, }[] = [ { value: "lingdocs", label: "LingDocs", }, { value: "ipa", label: "IPA", }, { value: "alalc", label: "ALALC", }, ]; function SpellingDemo({ opts, onChange }: { opts: T.TextOptions, onChange: (opts: T.TextOptions) => void, }) { return
Pashto Spelling Convention:
{spellingOptions.map(({ value, label }) => (
{ onChange({ ...opts, spelling: value, }); }} />
))}
Latin Phonetic System:
{phoneticsOptions.map(({ value, label }) => (
{ onChange({ ...opts, phonetics: value, }); }} />
))}
Diacritics Engine:
{ onChange({ ...opts, diacritics: true, }); }} />
{ onChange({ ...opts, diacritics: false, }); }} />
{[ { p: "زما زوی مکتب ته ځي", f: "zmaa zooy maktab ta dzee", }, { p: "دا ښه سړی دی", f: "daa xu saRey dey", }, { p: "په دکان کې مې ډېر خلک لیدلي دي", f: "pu dUkaan ke me Der khalk leedulee dee", }, ]}
; } export default SpellingDemo;