Skip to content

Commit

Permalink
Various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gabro committed May 6, 2024
1 parent b92b988 commit 89d7641
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 60 deletions.
123 changes: 72 additions & 51 deletions projects/layout-components/documentation.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions projects/layout-components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:host {
display: block;
}
3 changes: 3 additions & 0 deletions projects/layout-components/src/lib/inset/inset.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:host {
display: block;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:host {
display: grid;
}
}
9 changes: 5 additions & 4 deletions projects/layout-components/src/lib/tiles/tiles.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, HostBinding, Input } from '@angular/core';
import { Component, HostBinding, Input, numberAttribute } from '@angular/core';
import { Gap, Padding } from '../common';

@Component({
Expand All @@ -10,10 +10,11 @@ import { Gap, Padding } from '../common';
})
export class TilesComponent {
@HostBinding('style.gap') @Input() gap: Gap = '0';
@HostBinding('style.grid-template-columns')
@Input()
gridTemplateColumns: string = 'repeat(4, 1fr)';
@HostBinding('style.grid-template-rows') @Input() gridTemplateRows: string =
'auto';
@HostBinding('style.padding') @Input() padding: Padding = '0';
@Input({ transform: numberAttribute }) columns: number = 0;
@HostBinding('style.grid-template-columns') get gridTemplateColumns() {
return `repeat(${this.columns}, 1fr)`;
}
}
1 change: 1 addition & 0 deletions projects/layout-components/src/stories/tiles.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ type Story = StoryObj<TilesComponent>;
export const Basic: Story = {
args: {
gap: '16px',
columns: 3,
},
};

0 comments on commit 89d7641

Please sign in to comment.