Skip to content

Commit

Permalink
Minor fixes (#460)
Browse files Browse the repository at this point in the history
* fix(frontend): add padding and height to loader fallback

* fix(react): remove height and padding from fallback wrapper

* docs: add changesets
  • Loading branch information
guerrap authored and luzzif committed Oct 30, 2023
1 parent 08411fc commit 7808812
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/fresh-jobs-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/react": patch
---

Remove height and padding from fallback wrapper
5 changes: 5 additions & 0 deletions .changeset/yellow-apes-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/host-frontend": patch
---

Add padding and height to loader fallback
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const CreateWithTemplateId = () => {
key={formKey}
template={template || undefined}
fallback={
<div className="text-black flex justify-center">
<div className="h-screen py-20 text-black flex justify-center">
<Loader />
</div>
}
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const Page = () => {
kpiToken={watchedKPITokenWithData}
i18n={i18n}
fallback={
<div className="text-black flex justify-center items-center">
<div className="h-screen py-20 text-black flex justify-center items-center">
<Loader />
</div>
}
Expand Down
3 changes: 1 addition & 2 deletions packages/react/src/components/template-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ export function TemplateComponent({
);
}, [systemDarkTheme, theme]);

if (loading || !template || !Component)
return <div className="h-screen py-20">{fallback}</div>;
if (loading || !template || !Component) return <div>{fallback}</div>;
return (
<div
className={wrapperStyles({
Expand Down

0 comments on commit 7808812

Please sign in to comment.