mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
Switch withProperties to be withProps (#16380)
* Transition to withProps in arc * Transition to withProps inputbox * Transition to withProps in checkbox * Transition to withProps text * Transition to withProps in declarative table * Transition to withProps hyperlink * Transition to withProps in button * Transition to withProps radiobutton * Transition to withProps in input * Transition to withProps button * Transition to withProps in text * Transition to withProps image * Transition to withProps declare table * Transition to withProps in table * Transition to withProps radio button * Transition to withProps in image * Transition to withProps radio button * Transition to withProps in commit * Transition to withProps div cont * Transition to withProps in comp * Transition to withProps radio card * Transition to withProps in comp icon * Transition to withProps card * Transition to withProps list
This commit is contained in:
@@ -246,7 +246,7 @@ export default class MainController implements vscode.Disposable {
|
||||
light: path.join(__dirname, '..', 'media', 'monitor.svg'),
|
||||
dark: path.join(__dirname, '..', 'media', 'monitor_inverse.svg')
|
||||
};
|
||||
let table = view.modelBuilder.table().withProperties<azdata.TableComponentProperties>({
|
||||
let table = view.modelBuilder.table().withProps({
|
||||
data: [
|
||||
['1', '2', '2', { enabled: false, checked: false },
|
||||
undefined, // for button/hyperlink column, 'undefined' means to use the default information provided by the column definition
|
||||
@@ -700,7 +700,7 @@ export default class MainController implements vscode.Disposable {
|
||||
})
|
||||
.withItems([
|
||||
view.modelBuilder.card()
|
||||
.withProperties<azdata.CardProperties>({
|
||||
.withProps({
|
||||
label: 'label1',
|
||||
value: 'value1',
|
||||
actions: [{ label: 'action' }]
|
||||
@@ -712,7 +712,7 @@ export default class MainController implements vscode.Disposable {
|
||||
.withLayout({ flexFlow: 'column' })
|
||||
.withItems([
|
||||
view.modelBuilder.card()
|
||||
.withProperties<azdata.CardProperties>({
|
||||
.withProps({
|
||||
label: 'label2',
|
||||
value: 'value2',
|
||||
actions: [{ label: 'action' }]
|
||||
|
||||
@@ -10,7 +10,7 @@ export async function openModelViewDashboard(context: vscode.ExtensionContext):
|
||||
const dashboard = azdata.window.createModelViewDashboard('Test Dashboard');
|
||||
dashboard.registerTabs(async (view: azdata.ModelView) => {
|
||||
// Tab with toolbar
|
||||
const button = view.modelBuilder.button().withProperties<azdata.ButtonProperties>({
|
||||
const button = view.modelBuilder.button().withProps({
|
||||
label: 'Add databases tab',
|
||||
iconPath: {
|
||||
light: context.asAbsolutePath('images/compare.svg'),
|
||||
@@ -22,7 +22,7 @@ export async function openModelViewDashboard(context: vscode.ExtensionContext):
|
||||
orientation: azdata.Orientation.Horizontal
|
||||
}).component();
|
||||
|
||||
const input1 = view.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({ value: 'input 1' }).component();
|
||||
const input1 = view.modelBuilder.inputBox().withProps({ value: 'input 1' }).component();
|
||||
const homeTab: azdata.DashboardTab = {
|
||||
id: 'home',
|
||||
toolbar: toolbar,
|
||||
@@ -32,8 +32,8 @@ export async function openModelViewDashboard(context: vscode.ExtensionContext):
|
||||
};
|
||||
|
||||
// Tab with nested tabbed Panel
|
||||
const addTabButton = view.modelBuilder.button().withProperties<azdata.ButtonProperties>({ label: 'Add a tab', width: '150px' }).component();
|
||||
const removeTabButton = view.modelBuilder.button().withProperties<azdata.ButtonProperties>({ label: 'Remove a tab', width: '150px' }).component();
|
||||
const addTabButton = view.modelBuilder.button().withProps({ label: 'Add a tab', width: '150px' }).component();
|
||||
const removeTabButton = view.modelBuilder.button().withProps({ label: 'Remove a tab', width: '150px' }).component();
|
||||
const container = view.modelBuilder.flexContainer().withItems([addTabButton, removeTabButton]).withLayout({ flexFlow: 'column' }).component();
|
||||
const nestedTab1 = {
|
||||
title: 'Tab1',
|
||||
@@ -45,7 +45,7 @@ export async function openModelViewDashboard(context: vscode.ExtensionContext):
|
||||
}
|
||||
};
|
||||
|
||||
const input2 = view.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({ value: 'input 2' }).component();
|
||||
const input2 = view.modelBuilder.inputBox().withProps({ value: 'input 2' }).component();
|
||||
const nestedTab2 = {
|
||||
title: 'Tab2',
|
||||
content: input2,
|
||||
@@ -56,7 +56,7 @@ export async function openModelViewDashboard(context: vscode.ExtensionContext):
|
||||
id: 'tab2'
|
||||
};
|
||||
|
||||
const input3 = view.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({ value: 'input 4' }).component();
|
||||
const input3 = view.modelBuilder.inputBox().withProps({ value: 'input 4' }).component();
|
||||
const nestedTab3 = {
|
||||
title: 'Tab3',
|
||||
content: input3,
|
||||
@@ -95,7 +95,7 @@ export async function openModelViewDashboard(context: vscode.ExtensionContext):
|
||||
};
|
||||
|
||||
// Databases tab
|
||||
const databasesText = view.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({ value: 'This is databases tab', width: '200px' }).component();
|
||||
const databasesText = view.modelBuilder.inputBox().withProps({ value: 'This is databases tab', width: '200px' }).component();
|
||||
const databasesTab: azdata.DashboardTab = {
|
||||
id: 'databases',
|
||||
content: databasesText,
|
||||
|
||||
Reference in New Issue
Block a user