Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/core/ui/dialogs/dialogs-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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>{});
}
Expand All @@ -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>{});
}
Expand All @@ -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>{});
}
Expand Down
Loading