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/578 counter state #826

Merged
merged 3 commits into from
Jan 24, 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
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
Loading