Skip to content

Commit 89d7641

Browse files
committedMay 6, 2024··
Various fixes
1 parent b92b988 commit 89d7641

File tree

7 files changed

+89
-60
lines changed

7 files changed

+89
-60
lines changed
 

Diff for: ‎projects/layout-components/documentation.json

+72-51
Large diffs are not rendered by default.

Diff for: ‎projects/layout-components/package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:host {
2+
display: block;
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:host {
2+
display: block;
3+
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
:host {
22
display: grid;
3-
}
3+
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, HostBinding, Input } from '@angular/core';
1+
import { Component, HostBinding, Input, numberAttribute } from '@angular/core';
22
import { Gap, Padding } from '../common';
33

44
@Component({
@@ -10,10 +10,11 @@ import { Gap, Padding } from '../common';
1010
})
1111
export class TilesComponent {
1212
@HostBinding('style.gap') @Input() gap: Gap = '0';
13-
@HostBinding('style.grid-template-columns')
14-
@Input()
15-
gridTemplateColumns: string = 'repeat(4, 1fr)';
1613
@HostBinding('style.grid-template-rows') @Input() gridTemplateRows: string =
1714
'auto';
1815
@HostBinding('style.padding') @Input() padding: Padding = '0';
16+
@Input({ transform: numberAttribute }) columns: number = 0;
17+
@HostBinding('style.grid-template-columns') get gridTemplateColumns() {
18+
return `repeat(${this.columns}, 1fr)`;
19+
}
1920
}

Diff for: ‎projects/layout-components/src/stories/tiles.stories.ts

+1
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@ type Story = StoryObj<TilesComponent>;
4040
export const Basic: Story = {
4141
args: {
4242
gap: '16px',
43+
columns: 3,
4344
},
4445
};

0 commit comments

Comments
 (0)
Please sign in to comment.