Skip to content
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

fix(experimental): fix problem with tuiCell #6650

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion projects/demo/src/modules/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export const ROUTES: Routes = [
path: 'experimental/card-medium',
loadChildren: async () =>
(await import('../experimental/card-medium/card-medium.module'))
.ExampleTuiCardModule,
.ExampleTuiCardMediumModule,
data: {
title: 'CardMedium',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import {changeDetection} from '@demo/emulate/change-detection';
import {TuiDocExample, TuiRawLoaderContent} from '@taiga-ui/addon-doc';

@Component({
selector: 'example-card',
selector: 'example-card-medium',
templateUrl: './card-medium.template.html',
changeDetection,
})
export class ExampleTuiCardComponent {
export class ExampleTuiCardMediumComponent {
readonly exampleModule: TuiRawLoaderContent = import(
'./examples/import/import-module.md?raw'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ import {
TuiTitleModule,
} from '@taiga-ui/experimental';

import {ExampleTuiCardComponent} from './card-medium.component';
import {ExampleTuiCardMediumComponent} from './card-medium.component';
import {TuiCardMediumExample1} from './examples/1';
import {TuiCardMediumExample2} from './examples/2';
import {TuiCardMediumExample3} from './examples/3';
import {TuiCardExample4} from './examples/4';
import {TuiCardMediumExample4} from './examples/4';
import {TuiCardMediumExample5} from './examples/5';
import {TuiCardMediumExample6} from './examples/6';
import {TuiCardMediumExample7} from './examples/7';
Expand Down Expand Up @@ -66,7 +66,7 @@ import {TuiCardMediumExample7} from './examples/7';
TuiButtonModule,
TuiHeaderModule,
TuiCellModule,
tuiGetDocModules(ExampleTuiCardComponent),
tuiGetDocModules(ExampleTuiCardMediumComponent),
TuiRepeatTimesModule,
TuiDataListModule,
TuiHostedDropdownModule,
Expand All @@ -76,15 +76,15 @@ import {TuiCardMediumExample7} from './examples/7';
TuiAppearanceModule,
],
declarations: [
ExampleTuiCardComponent,
ExampleTuiCardMediumComponent,
TuiCardMediumExample1,
TuiCardMediumExample2,
TuiCardMediumExample3,
TuiCardExample4,
TuiCardMediumExample4,
TuiCardMediumExample5,
TuiCardMediumExample6,
TuiCardMediumExample7,
],
exports: [ExampleTuiCardComponent],
exports: [ExampleTuiCardMediumComponent],
})
export class ExampleTuiCardModule {}
export class ExampleTuiCardMediumModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package="EXPERIMENTAL"
type="components"
>
<ng-template pageTab="Medium">
<ng-template pageTab>
<tui-notification status="warning">
This code is
<strong>experimental</strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {encapsulation} from '@demo/emulate/encapsulation';
encapsulation,
changeDetection,
})
export class TuiCardExample4 {
export class TuiCardMediumExample4 {
readonly urls = [
'https://avatars.githubusercontent.com/u/11832552',
'https://avatars.githubusercontent.com/u/10106368',
Expand Down
2 changes: 2 additions & 0 deletions projects/demo/src/modules/experimental/cell/cell.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
TuiBadgeModule,
TuiBadgeNotificationModule,
TuiButtonModule,
TuiCardModule,
TuiCellModule,
TuiCheckboxModule,
TuiFadeModule,
Expand Down Expand Up @@ -75,6 +76,7 @@ import {TuiCellExample7} from './examples/7';
TuiHostedDropdownModule,
TuiGroupModule,
tuiGetDocModules(ExampleTuiCellComponent),
TuiCardModule,
],
declarations: [
ExampleTuiCellComponent,
Expand Down
34 changes: 17 additions & 17 deletions projects/demo/src/modules/experimental/cell/examples/7/index.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<div tuiSurface="elevated">
<div
tuiCardLarge
tuiSurface="elevated"
>
<h3 tuiTitle="m">Inside a block</h3>
<div class="actions">
<button
*ngFor="let item of items"
tuiCell
class="action"
>
<tui-avatar
appearance="accent"
[src]="item.icon"
></tui-avatar>
<span tuiTitle>
{{ item.title }}
<span tuiSubtitle>{{ item.subtitle }}</span>
</span>
</button>
</div>
<button
*ngFor="let item of items"
tuiCell
>
<tui-avatar
appearance="accent"
[src]="item.icon"
></tui-avatar>
<span tuiTitle>
{{ item.title }}
<span tuiSubtitle>{{ item.subtitle }}</span>
</span>
</button>
</div>

<label tuiLabel="Inside a dropdown">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,3 @@
max-width: 20rem;
gap: 1rem;
}

.actions {
display: flex;
flex-direction: column;
gap: 0.25rem;
margin: 1rem -0.5rem -0.5rem;
}

.action {
padding-left: 0.5rem;
padding-right: 0.5rem;
border-radius: 0.75rem;
}
2 changes: 1 addition & 1 deletion projects/experimental/directives/card/card.styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
gap: var(--t-gap);
align-items: stretch;

> :last-child {
> :last-child:not([tuiCell]) {
margin-top: auto;
}
}
Expand Down
Loading