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(kit): Connected work with CardLarge #9040

Merged
merged 1 commit into from
Sep 16, 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
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
Loading