Skip to content

Commit

Permalink
Fix/578 counter state (#826)
Browse files Browse the repository at this point in the history
* fix(ui-library): renamed default to neutral
  • Loading branch information
JpunktWpunkt authored Jan 24, 2024
1 parent 3673914 commit ea8ae88
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/ui-library/src/components/forms/textarea/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class BlrTextarea extends LitElement {
}

protected determinateCounterVariant(): CounterVariantType {
let counterVariant: CounterVariantType = 'default';
let counterVariant: CounterVariantType = 'neutral';

if (this.maxLength) {
if (this.warningLimitType === 'warningLimitPer' && this.count >= (this.maxLength / 100) * this.warningLimitPer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const BlrCounter = (params: BlrCounterType) => BlrCounterRenderFunction(p
BlrCounter.storyName = 'Counter';
const defaultParams: BlrCounterType = {
theme: 'Light',
variant: 'default',
variant: 'neutral',
size: 'md',
current: 3,
max: 100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { TAG_NAME } from './renderFunction';
export class BlrCounter extends LitElement {
static styles = [];

@property() variant: CounterVariantType = 'default';
@property() variant: CounterVariantType = 'neutral';
@property() current = 0;
@property() max = 0;
@property() size?: FormSizesType = 'md';
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-library/src/globals/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const IconPositionVariant = ['leading', 'trailing'] as const;
export const ActionVariants = ['primary', 'secondary', 'cta', 'silent', 'destructive', 'encourage'] as const;
export const FeedbackVariants = ['default', 'inverted'] as const;
export const CaptionVariants = ['hint', 'error'] as const;
export const CounterVariants = ['default', 'warn', 'error'] as const;
export const CounterVariants = ['neutral', 'warn', 'error'] as const;
export const DividerVariations = ['vertical', 'horizontal'] as const;
export const TabVariants = ['standard', 'fullWidth'] as const;
export const TabContentVariants = ['labelOnly', 'iconOnly', 'labelAndIcon'] as const;
Expand Down

0 comments on commit ea8ae88

Please sign in to comment.