mirror of
https://github.com/System-End/github-readme-stats.git
synced 2026-04-19 19:55:16 +00:00
parent
a3c6f874af
commit
2ab8b85ae3
2 changed files with 4 additions and 5 deletions
|
|
@ -13,7 +13,7 @@ import {
|
|||
import { langCardLocales } from "../translations.js";
|
||||
|
||||
const DEFAULT_CARD_WIDTH = 300;
|
||||
const MIN_CARD_WIDTH = 230;
|
||||
const MIN_CARD_WIDTH = 280;
|
||||
const DEFAULT_LANGS_COUNT = 5;
|
||||
const DEFAULT_LANG_COLOR = "#858585";
|
||||
const CARD_PADDING = 25;
|
||||
|
|
@ -317,7 +317,6 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
|||
|
||||
let finalLayout = "";
|
||||
if (layout === "compact" || hide_progress == true) {
|
||||
width = width + 50; // padding
|
||||
height =
|
||||
calculateCompactLayoutHeight(langs.length) + (hide_progress ? -25 : 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ describe("Test renderTopLanguages", () => {
|
|||
);
|
||||
expect(queryAllByTestId(document.body, "lang-progress")[0]).toHaveAttribute(
|
||||
"width",
|
||||
"120",
|
||||
"100",
|
||||
);
|
||||
|
||||
expect(queryAllByTestId(document.body, "lang-name")[1]).toHaveTextContent(
|
||||
|
|
@ -224,7 +224,7 @@ describe("Test renderTopLanguages", () => {
|
|||
);
|
||||
expect(queryAllByTestId(document.body, "lang-progress")[1]).toHaveAttribute(
|
||||
"width",
|
||||
"120",
|
||||
"100",
|
||||
);
|
||||
|
||||
expect(queryAllByTestId(document.body, "lang-name")[2]).toHaveTextContent(
|
||||
|
|
@ -232,7 +232,7 @@ describe("Test renderTopLanguages", () => {
|
|||
);
|
||||
expect(queryAllByTestId(document.body, "lang-progress")[2]).toHaveAttribute(
|
||||
"width",
|
||||
"60",
|
||||
"50",
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue