2021-03-09 12:39:13 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2021 lingdocs.com
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
import Pashto from "./Pashto";
|
|
|
|
import Phonetics from "./Phonetics";
|
|
|
|
import * as T from "../types";
|
|
|
|
|
|
|
|
function SingleItemDisplay({ item, textOptions, english }: {
|
|
|
|
item: T.PsString,
|
|
|
|
textOptions: T.TextOptions,
|
|
|
|
english?: T.EnglishBlock | string,
|
|
|
|
}) {
|
|
|
|
const eng = Array.isArray(english) ? english[0][0] : english;
|
|
|
|
return <div className="text-center mt-3 mb-2">
|
|
|
|
<div><Pashto opts={textOptions}>{item}</Pashto></div>
|
|
|
|
<div><Phonetics opts={textOptions}>{item}</Phonetics></div>
|
2021-07-05 08:21:57 +00:00
|
|
|
{eng && <div className="text-muted">{eng}</div>}
|
2021-03-09 12:39:13 +00:00
|
|
|
</div>;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default SingleItemDisplay;
|