Skip to content

Commit

Permalink
Update GridContainer.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
vanvianen committed Jan 12, 2025
1 parent d80947e commit a69947e
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions src/ts/GridContainer.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,42 @@
class GridContainer {
// ============================================================================
// Import
// ============================================================================

import Unit from "./Unit";


// ============================================================================
// Classes
// ============================================================================

export default class GridContainer {

// Parameters
// ========================================================================

rows: number;
columns: number;
rowGap: Unit;
columnGap: Unit;

constructor(rows: number, columns: number, rowGap: Unit, columnGap: Unit) {
// Constructor
// ========================================================================

constructor(
rows: number,
columns: number,
rowGap: Unit,
columnGap: Unit
) {
this.rows = rows;
this.columns = columns;
this.rowGap = rowGap;
this.columnGap = columnGap;
}

// Methods
// ========================================================================

setRows(rows: number): void {
this.rows = rows;
}
Expand All @@ -30,4 +56,4 @@ class GridContainer {
toString(): string {
return `GridContainer: ${this.rows} rows, ${this.columns} columns, row-gap ${this.rowGap.toString()}, column-gap ${this.columnGap.toString()}`;
}
}
}

0 comments on commit a69947e

Please sign in to comment.