mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-14 01:43:14 +08:00
feat(core): added css class for styling dialog nested elements (#10605)
This commit is contained in:

committed by
GitHub

parent
dca77183d1
commit
6104b5bfa3
@ -3,8 +3,11 @@ import { View } from '../core/view';
|
||||
import { Color } from '../../color';
|
||||
import { Page } from '../page';
|
||||
import { Frame } from '../frame';
|
||||
import { CSSUtils } from '../../css/system-classes';
|
||||
import { isObject, isString } from '../../utils/types';
|
||||
|
||||
const CSS_CLASS = `${CSSUtils.CLASS_PREFIX}dialog-item`;
|
||||
|
||||
export namespace DialogStrings {
|
||||
export const STRING = 'string';
|
||||
export const PROMPT = 'Prompt';
|
||||
@ -271,6 +274,7 @@ export function getButtonColors(): { color: Color; backgroundColor: Color } {
|
||||
if (!button) {
|
||||
const Button = require('../button').Button;
|
||||
button = new Button();
|
||||
button.className = CSS_CLASS;
|
||||
if (__APPLE__) {
|
||||
button._setupUI(<any>{});
|
||||
}
|
||||
@ -290,6 +294,7 @@ export function getLabelColor(): Color {
|
||||
if (!label) {
|
||||
const Label = require('../label').Label;
|
||||
label = new Label();
|
||||
label.className = CSS_CLASS;
|
||||
if (__APPLE__) {
|
||||
label._setupUI(<any>{});
|
||||
}
|
||||
@ -307,6 +312,7 @@ export function getTextFieldColor(): Color {
|
||||
if (!textField) {
|
||||
const TextField = require('../text-field').TextField;
|
||||
textField = new TextField();
|
||||
textField.className = CSS_CLASS;
|
||||
if (__APPLE__) {
|
||||
textField._setupUI(<any>{});
|
||||
}
|
||||
|
Reference in New Issue
Block a user