diff --git a/src/demo-components/SpellingDemo.tsx b/src/demo-components/SpellingDemo.tsx index 5055189..70fbb74 100644 --- a/src/demo-components/SpellingDemo.tsx +++ b/src/demo-components/SpellingDemo.tsx @@ -2,162 +2,167 @@ import Examples from "../components/src/Examples"; import * as T from "../types"; const spellingOptions: { - value: T.TextOptions["spelling"], - label: string, + value: T.TextOptions["spelling"]; + label: string; }[] = [ - { - value: "Afghan", - label: "Afghan", - }, - { - value: "Pakistani ي", - label: "Pakistani ي", - }, - { - value: "Pakistani ی", - label: "Pakistani ی", - }, + { + value: "Afghan", + label: "Afghan", + }, + { + value: "Pakistani ي", + label: "Pakistani ي", + }, + { + value: "Pakistani ی", + label: "Pakistani ی", + }, ]; const phoneticsOptions: { - value: T.TextOptions["phonetics"], - label: string, + value: T.TextOptions["phonetics"]; + label: string; }[] = [ - { - value: "lingdocs", - label: "LingDocs", - }, - { - value: "ipa", - label: "IPA", - }, - { - value: "alalc", - label: "ALALC", - }, + { + value: "lingdocs", + label: "LingDocs", + }, + { + value: "ipa", + label: "IPA", + }, + { + value: "alalc", + label: "ALALC", + }, ]; -function SpellingDemo({ opts, onChange }: { - opts: T.TextOptions, - onChange: (opts: T.TextOptions) => void, +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, - }); - }} - /> - -
-
-
-
+ return ( +
+
    +
  • Converts text between Afghan and Pakistani spelling conventions
  • +
  • + Generates diacritics for Pashto script when given phonetic script + along with Pashto script +
  • +
+
+
+
+
+
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", - }, - ]} -
-
; +
+
+ + {[ + { + p: "زما زوی مکتب ته ځي", + f: "zmaa zooy maktab ta dzee", + }, + { + p: "دا ښه سړی دی", + f: "daa xu saRey day", + }, + { + p: "په دکان کې مې ډېر خلک لیدلي دي", + f: "pu dUkaan ke me Der khalk leedulee dee", + }, + ]} + +
+
+ ); } -export default SpellingDemo; \ No newline at end of file +export default SpellingDemo;