Skip to content

Commit f6d7e4d

Browse files
committed
fix(frontend): legend overlapping dropdown on small breakpoints
1 parent feb4a41 commit f6d7e4d

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

frontend/routes/package/(_islands)/DownloadChart.tsx

+11-1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ export function DownloadChart(props: Props) {
8686
borderColor: isDarkMode ? "#47515c" : "#e5e8eb", // jsr-gray-700 for dark mode, jsr-gray-100 for light
8787
strokeDashArray: 3,
8888
},
89+
responsive: [
90+
{
91+
breakpoint: 768,
92+
options: {
93+
legend: {
94+
horizontalAlign: "left",
95+
},
96+
},
97+
},
98+
],
8999
});
90100

91101
useEffect(() => {
@@ -160,7 +170,7 @@ export function DownloadChart(props: Props) {
160170
</select>
161171
</div>
162172
)}
163-
<div className="h-[300px] text-secondary">
173+
<div className="h-[300px] md:pt-0 pt-10 text-secondary">
164174
<div ref={chartDivRef} />
165175
</div>
166176
</div>

frontend/routes/package/versions.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export default define.page<typeof handler>(function Versions({
101101
latestVersion={data.package.latestVersion}
102102
/>
103103

104-
<div class="mt-8">
104+
<div class="mt-4 md:mt-8">
105105
<DownloadChart downloads={data.downloads.recentVersions} />
106106
</div>
107107

0 commit comments

Comments
 (0)