feat(core): added css class for styling dialog nested elements (#10605)

This commit is contained in:
Dimitris-Rafail Katsampas
2024-08-23 05:06:22 +03:00
committed by GitHub
parent dca77183d1
commit 6104b5bfa3

View File

@ -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>{});
}