Skip to content

Commit

Permalink
fix(kit): Connected work with CardLarge (#9040)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlufy authored Sep 16, 2024
1 parent 543acfa commit 71f699c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 8 deletions.
36 changes: 29 additions & 7 deletions projects/demo/src/modules/components/cell/examples/8/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
<tui-notification>
<div>
Can be attached as host directive:
<code>hostDirectives: [TuiConnected]</code>
</div>
</tui-notification>

<div
tuiCardLarge
tuiConnected
tuiSurface="elevated"
>
<h3 tuiTitle="m">Inside a block</h3>
<button
*ngFor="let item of items"
tuiCell
type="button"
>
<tui-avatar
appearance="accent"
[src]="item.icon"
/>
<span tuiTitle>
{{ item.title }}
<span tuiSubtitle>{{ item.subtitle }}</span>
</span>
</button>
</div>

<div tuiConnected>
<label tuiCell>
<tui-badged-content>
Expand Down Expand Up @@ -68,10 +97,3 @@
/>
</label>
</div>

<tui-notification>
<div>
Can be attached as host directive:
<code>hostDirectives: [TuiConnected]</code>
</div>
</tui-notification>
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export default class Example {
{
icon: '@tui.mail',
title: 'Send message',
subtitle: 'Keep it short',
subtitle:
'Allow outgoing unusual call that can change your life in an unusual way',
},
{
icon: '@tui.lock',
Expand Down
4 changes: 4 additions & 0 deletions projects/kit/directives/connected/connected.style.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
--t-image-size: 2.5rem;
--t-connected-height: calc(100% - var(--t-image-size) - 0.5rem);

&[tuiCardLarge] {
--t-connected-height: calc(100% - var(--t-image-size) - 0.25rem);
}

[tuiCell],
[tuiStep] {
&:not(:last-of-type)::after {
Expand Down
3 changes: 3 additions & 0 deletions projects/layout/components/cell/cell.styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@
& > [tuiAccessories] tui-avatar,
& > [tuiAccessories] tui-avatar-stack tui-avatar {
--t-size: 2rem;

align-self: flex-start;
}
}

Expand All @@ -155,6 +157,7 @@

font: var(--tui-font-text-m);
font-weight: bold;
align-self: flex-start;
}
}

Expand Down

0 comments on commit 71f699c

Please sign in to comment.