Skip to content

Commit

Permalink
cr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rivka-ungar committed May 19, 2024
1 parent c929d2d commit 966b539
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/core/src/components/Label/Label.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
border-radius: var(--border-radius-small);
padding: 2px var(--spacing-small);
position: relative;

&.small {
padding: 0 var(--spacing-xs);
border-radius: 2px;
}
}

.withLeg {
Expand Down Expand Up @@ -153,11 +158,6 @@
}
}

.small {
padding: 0 var(--spacing-xs);
border-radius: 2px;
}

@include keyframe(label-spin-in-emphasized) {
@include spin-in-emphasized();
}
24 changes: 22 additions & 2 deletions packages/core/src/components/Label/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,32 @@ import { backwardCompatibilityForProperties } from "../../helpers/backwardCompat
import Text from "../Text/Text";
import Leg from "./Leg";
import { LabelColor, LabelKind } from "./LabelConstants";
import { VibeComponent, withStaticProps } from "../../types";
import { VibeComponent, VibeComponentProps, withStaticProps } from "../../types";
import useClickableProps from "../../hooks/useClickableProps/useClickableProps";
import useMergeRef from "../../hooks/useMergeRef";
import styles from "./Label.module.scss";
import LabelCelebrationAnimation from "./LabelCelebrationAnimation";
import { mapSizesToTextSize, LabelProps } from "./Label.types";
import { mapSizesToTextSize, Sizes } from "./Label.types";

// TODO remove in vibe 3
export interface LabelProps extends VibeComponentProps {
/**
* @deprecated - use className instead
*/
wrapperClassName?: string;
/**
* Class name for an inner text wrapper
*/
labelClassName?: string;
kind?: LabelKind;
color?: LabelColor;
text?: string;
isAnimationDisabled?: boolean;
isLegIncluded?: boolean;
onClick?: (event: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
celebrationAnimation?: boolean;
size?: Sizes;
}

const Label: VibeComponent<LabelProps> & {
colors?: typeof LabelColor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ export const Overview = {
parameters: {
chromatic: {
pauseAnimationAtEnd: true
},
docs: {
liveEdit: {
isEnabled: false
}
}
}
};
Expand Down

0 comments on commit 966b539

Please sign in to comment.