Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyRoyt committed Mar 21, 2024
1 parent be4346f commit f9db261
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/core/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export interface ButtonProps extends VibeComponentProps {
successText?: string;
/** loading boolean which switches the text to a loader */
loading?: boolean;
/** className which is applied to loader container **/
loaderClassName?: string;
style?: React.CSSProperties;
/** displays the active state */
Expand Down Expand Up @@ -348,7 +349,7 @@ const Button: VibeComponent<ButtonProps, unknown> & {
return (
<button {...buttonProps} key={`${id}-loading`}>
<span className={cx(styles.loader, loaderClassName)}>
<Loader className={cx(styles.loaderSvg)} />
<Loader className={styles.loaderSvg} />
<span aria-hidden className={styles.textPlaceholder}>
{buttonContent}
</span>
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/components/IconButton/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { ComponentDefaultTestId } from "../../tests/constants";
import { backwardCompatibilityForProperties } from "../../helpers/backwardCompatibilityForProperties";
import Button from "../Button/Button";
import { BUTTON_ICON_SIZE, ButtonColor, ButtonType } from "../Button/ButtonConstants";
import styles from "./IconButton.module.scss";
import { getStyle } from "../../helpers/typesciptCssModulesHelper";
import styles from "./IconButton.module.scss";

export interface IconButtonProps extends VibeComponentProps {
/**
Expand Down Expand Up @@ -87,6 +87,7 @@ export interface IconButtonProps extends VibeComponentProps {
insetFocus?: boolean;
/** Specifies the tab order of an element */
tabIndex?: number;
/** loading boolean which switches the text to a loader */
loading?: boolean;
}

Expand Down

0 comments on commit f9db261

Please sign in to comment.