import { SearchBar } from "tns-core-modules/ui/search-bar"; import { Color } from "tns-core-modules/color"; import { getColor } from "../helper"; export function getNativeHintColor(searchBar: SearchBar): Color { if ((searchBar)._textField) { const placeholder = (searchBar)._textField.valueForKey("placeholderLabel"); return getColor(placeholder.textColor); } return undefined; } export function getNativeTextFieldBackgroundColor(searchBar: SearchBar): Color { return (searchBar)._textField ? getColor((searchBar)._textField.backgroundColor) : undefined; } export function getNativeFontSize(searchBar: SearchBar): number { return (searchBar)._textField ? (searchBar)._textField.font.pointSize : undefined; }