mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Apply some DRY
This commit is contained in:
@@ -11,5 +11,8 @@ export function buttonTap(args) {
|
||||
v.style._resetValue(style.fontStyleProperty);
|
||||
v.style._resetValue(style.fontWeightProperty);
|
||||
v.style._resetValue(style.fontProperty);
|
||||
|
||||
v.style._resetValue(style.colorProperty);
|
||||
v.style._resetValue(style.textAlignmentProperty);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,34 @@
|
||||
<StackLayout id="stack">
|
||||
<Button text="RESET" tap="buttonTap"/>
|
||||
|
||||
|
||||
<Label text="GREEN" style="color: green" />
|
||||
<Button text="GREEN" style="color: green"/>
|
||||
<TextView text="GREEN" style="color: green"/>
|
||||
<TextField text="GREEN" style="color: green"/>
|
||||
|
||||
|
||||
<Label text="no align" />
|
||||
<Label text="left" style="text-align: left" />
|
||||
<Label text="center" style="text-align: center" />
|
||||
<Label text="right" style="text-align: right" />
|
||||
|
||||
<Button text="no align" />
|
||||
<Button text="left" style="text-align: left" />
|
||||
<Button text="center" style="text-align: center" />
|
||||
<Button text="right" style="text-align: right" />
|
||||
|
||||
<TextView text="no align" />
|
||||
<TextView text="left" style="text-align: left" />
|
||||
<TextView text="center" style="text-align: center" />
|
||||
<TextView text="right" style="text-align: right" />
|
||||
|
||||
<TextField text="no align" />
|
||||
<TextField text="left" style="text-align: left" />
|
||||
<TextField text="center" style="text-align: center" />
|
||||
<TextField text="right" style="text-align: right" />
|
||||
|
||||
|
||||
<Label text="Label: normal" />
|
||||
<Label text="Label: size" style="font-size: 32" />
|
||||
<Label text="Label: italic" style="font-style: italic" />
|
||||
|
||||
Reference in New Issue
Block a user