@@ -2,9 +2,10 @@ import { Label as HtmlViewDefinition, TextShadow } from './label';
2
2
import { booleanConverter , Color , CSSType , dip } from 'tns-core-modules/ui/core/view' ;
3
3
import { Label as TNLabel } from 'tns-core-modules/ui/label/label' ;
4
4
import { Style } from 'tns-core-modules/ui/styling/style' ;
5
- import { CssProperty , Property } from 'tns-core-modules/ui/core/properties' ;
5
+ import { CssProperty , InheritedCssProperty , makeParser , makeValidator , Property } from 'tns-core-modules/ui/core/properties' ;
6
6
import { isIOS } from 'tns-core-modules/platform' ;
7
7
import { layout } from 'tns-core-modules/utils/utils' ;
8
+ // import { CssProperty, InheritedCssProperty, makeParser, makeValidator, Property } from "../core/properties";
8
9
9
10
export const cssProperty = ( target : Object , key : string | symbol ) => {
10
11
// property getter
@@ -77,3 +78,14 @@ export const textShadowProperty = new CssProperty<Style, string | TextShadow>({
77
78
}
78
79
} ) ;
79
80
textShadowProperty . register ( Style ) ;
81
+
82
+ export type VerticalTextAlignment = 'initial' | 'top' | 'middle' | 'bottom' ;
83
+
84
+ const textAlignmentConverter = makeParser < VerticalTextAlignment > ( makeValidator < VerticalTextAlignment > ( 'initial' , 'top' , 'middle' , 'bottom' ) ) ;
85
+ export const textAlignmentProperty = new InheritedCssProperty < Style , VerticalTextAlignment > ( {
86
+ name : 'verticalTextAlignment' ,
87
+ cssName : 'vertical-text-align' ,
88
+ defaultValue : 'initial' ,
89
+ valueConverter : textAlignmentConverter
90
+ } ) ;
91
+ textAlignmentProperty . register ( Style ) ;
0 commit comments