Skip to content

Commit

Permalink
chore: update style
Browse files Browse the repository at this point in the history
  • Loading branch information
Wxh16144 committed Dec 27, 2023
1 parent 43ca3b5 commit ff42b74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/client/theme-default/slots/Loading/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
@skeleton-cls: react-loading-skeleton;

.@{prefix}-loading-skeleton {

.@{skeleton-cls} {
margin-block-end: 0.38em;

// first-line indent
&.first-line {
display: inline-block;
width: calc(100% - 2em);
margin-inline-start: 2em;
}

// ======== dark mode ========
@{dark-selector} & {
--highlight-color: rgba(255, 255, 255, 0.12);
--base-color: #1f1f1f;
--highlight-color: fade(@c-text-dark, @dark-light-amount);
--base-color: @c-text;
}
}
}
4 changes: 2 additions & 2 deletions src/client/theme-default/slots/Loading/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import './index.less';
const Loading: React.FC = () => (
<div className="dumi-default-loading-skeleton">
<Skeleton className="first-line" count={1} />
<Skeleton count={Math.floor(Math.random() * 3) + 1} />
<Skeleton count={1} width={`${Math.random() * 50 + 30}%`} />
<Skeleton count={2} />
<Skeleton count={1} width="75%" />
</div>
);

Expand Down

0 comments on commit ff42b74

Please sign in to comment.