refactor: hide details, expose maxWidth
This commit is contained in:
@@ -1,10 +1,8 @@
|
|||||||
<mw-title-bar-base-money [amount]="amount()" [amountProps]="amountProps()">
|
<mw-title-bar-base-money [amount]="amount()" [amountProps]="amountProps">
|
||||||
<mw-typography
|
<mw-typography
|
||||||
[ellipsis]="true"
|
[ellipsis]="true"
|
||||||
maxWidth="19rem"
|
[maxWidth]="maxWidth()"
|
||||||
color="var(--mw-gray-500)"
|
color="var(--mw-gray-500)"
|
||||||
[letterSpacing]="categoryProps().letterSpacing"
|
size="1.6rem"
|
||||||
[lineHeight]="categoryProps().lineHeight"
|
|
||||||
[size]="categoryProps().size"
|
|
||||||
>{{category()}}</mw-typography>
|
>{{category()}}</mw-typography>
|
||||||
</mw-title-bar-base-money>
|
</mw-title-bar-base-money>
|
||||||
@@ -1,27 +1,20 @@
|
|||||||
import { Component, input } from '@angular/core';
|
import { Component, input } from '@angular/core';
|
||||||
import { TitleBarComponent } from './../../atoms/title-bar/title-bar.component'
|
|
||||||
import { MoneyTextComponent } from './../money-text/money-text.component';
|
|
||||||
import { TypographyComponent } from './../../atoms/typography/typography.component'
|
import { TypographyComponent } from './../../atoms/typography/typography.component'
|
||||||
import { TitleBarBaseMoneyComponent } from "../title-bar-base-money/title-bar-base-money.component";
|
import { TitleBarBaseMoneyComponent } from "../title-bar-base-money/title-bar-base-money.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'mw-title-bar-category',
|
selector: 'mw-title-bar-category',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [TitleBarComponent, MoneyTextComponent, TypographyComponent, TitleBarBaseMoneyComponent],
|
imports: [TypographyComponent, TitleBarBaseMoneyComponent],
|
||||||
templateUrl: './title-bar-category.component.html',
|
templateUrl: './title-bar-category.component.html',
|
||||||
styleUrl: './title-bar-category.component.css'
|
styleUrl: './title-bar-category.component.css'
|
||||||
})
|
})
|
||||||
export class TitleBarCategoryComponent {
|
export class TitleBarCategoryComponent {
|
||||||
amount = input(0);
|
amount = input(0);
|
||||||
category = input('');
|
category = input('');
|
||||||
categoryProps = input({
|
maxWidth = input('19rem')
|
||||||
ellipsis: true,
|
protected amountProps = {
|
||||||
letterSpacing: '0.5px',
|
|
||||||
lineHeight: null,
|
lineHeight: null,
|
||||||
size: '1.6rem',
|
size: '1.6rem',
|
||||||
});
|
};
|
||||||
amountProps = input({
|
|
||||||
lineHeight: null,
|
|
||||||
size: '1.6rem',
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user