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: fix loader #504

Merged
merged 5 commits into from
Jan 11, 2022
Merged

fix: fix loader #504

merged 5 commits into from
Jan 11, 2022

Conversation

thuey
Copy link
Collaborator

@thuey thuey commented Jan 11, 2022

Fixing a couple of regressions with the loader:

  • Allow label and variant props to be set for the loader overlay. (Since they are not included in the propTypes, they can't be set)
  • Restore the default layout styles for the loader (previously, was 50px auto)

Comment on lines +12 to +35
const LoaderOverlay = React.forwardRef<HTMLDivElement, LoaderOverlayProps>(
({ className, variant, label, ...other }: LoaderOverlayProps, ref) => (
<div
className={classNames(
'Loader__overlay',
className,
variant === 'large'
? 'Loader__overlay--large'
: variant === 'small'
? 'Loader__overlay--small'
: ''
)}
ref={ref}
{...other}
>
<div className="Loader__overlay__loader">
<Loader variant={variant} />
<AxeLoader />
</div>
{label ? <span className="Loader__overlay__label">{label}</span> : null}
{other.children}
</div>
{label ? <span className="Loader__overlay__label">{label}</span> : null}
{other.children}
</div>
));
)
);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All that changed here was React.HTMLAttributes<HTMLDivElement> -> LoaderOverlayProps

@github-actions
Copy link
Contributor

Preview branch generated at https://loader-prop-types.d1gko6en628vir.amplifyapp.com

@thuey thuey requested a review from scurker January 11, 2022 21:04
@thuey thuey changed the title fix: fix loader prop types fix: fix loader Jan 11, 2022
@thuey thuey merged commit 3127dde into develop Jan 11, 2022
@thuey thuey deleted the loader-prop-types branch January 11, 2022 22:26
@github-actions
Copy link
Contributor

Preview branch generated at https://loader-prop-types.d1gko6en628vir.amplifyapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants