Skip to content

Commit

Permalink
fix: various Skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
leopuleo committed Jan 21, 2025
1 parent 0f41f9a commit 34059bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import React from "react";

import { Skeleton } from "@webiny/ui/Skeleton";

import { Name } from "./styled";

export interface TitleProps {
interface TitleProps {
title?: string;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { ReactElement } from "react";

import { Skeleton } from "@webiny/ui/Skeleton";

Expand All @@ -8,10 +8,10 @@ export interface TitleProps {
title?: string;
}

export const Title = ({ title }: TitleProps) => {
export const Title = ({ title }: TitleProps): ReactElement => {
return (
<Name use={"headline6"} tag={"h1"}>
{title || <Skeleton theme={"dark"} />}
{title !== undefined ? title : <Skeleton theme={"dark"} />}
</Name>
);
};
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from "react";

import { Skeleton } from "@webiny/ui/Skeleton";

import { Name } from "./styled";
import { Name } from "./Title.styled";

export interface TitleProps {
title?: string;
Expand Down

0 comments on commit 34059bc

Please sign in to comment.