mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-13 00:51:45 +01:00
Revert "[AC-1423] Add minWidth input to bit-progress component"
This reverts commit 95b2223a30
.
This commit is contained in:
parent
72997070ab
commit
6782dd4a7f
@ -5,7 +5,7 @@
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100"
|
||||
attr.aria-valuenow="{{ barWidth }}"
|
||||
[ngStyle]="{ width: barWidthPercentage + '%' }"
|
||||
[ngStyle]="{ width: barWidth + '%' }"
|
||||
>
|
||||
<div
|
||||
*ngIf="displayText"
|
||||
|
@ -26,16 +26,11 @@ export class ProgressComponent {
|
||||
@Input() showText = true;
|
||||
@Input() size: SizeTypes = "default";
|
||||
@Input() text?: string;
|
||||
@Input() minWidth = 0;
|
||||
|
||||
get displayText() {
|
||||
return this.showText && this.size !== "small";
|
||||
}
|
||||
|
||||
protected get barWidthPercentage() {
|
||||
return this.barWidth > this.minWidth ? this.barWidth : this.minWidth;
|
||||
}
|
||||
|
||||
get outerBarStyles() {
|
||||
return ["tw-overflow-hidden", "tw-rounded", "tw-bg-secondary-100"].concat(
|
||||
SizeClasses[this.size]
|
||||
|
@ -15,7 +15,6 @@ export default {
|
||||
showText: true,
|
||||
size: "default",
|
||||
bgColor: "primary",
|
||||
minWidth: 0,
|
||||
},
|
||||
} as Meta;
|
||||
|
||||
@ -39,10 +38,3 @@ export const CustomText: Story = {
|
||||
text: "Loading...",
|
||||
},
|
||||
};
|
||||
|
||||
export const MinWidth: Story = {
|
||||
args: {
|
||||
barWidth: 0,
|
||||
minWidth: 5,
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user