mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-24 17:03:55 +10:00
1414fecade
* fix(pdf): apply custom style fontSize to icon and level indicator sizes Map fontSize from Icon and Level Indicator custom style slots to Phosphor icon size and level indicator dimensions, since react-pdf icons ignore fontSize in favor of the size prop. * fix: separate global icon and scoped level indicator font sizes Icon slot fontSize now drives all resume icons plus level display decorations. Level indicator fontSize overrides only within level display. Shared sizing logic lives in schema; design sidebar preview uses global rules. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
25 lines
826 B
TypeScript
25 lines
826 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { resolveLevelDisplaySizes } from "./level-display-sizes";
|
|
|
|
describe("resolveLevelDisplaySizes", () => {
|
|
it("uses typography defaults when no custom font sizes are set", () => {
|
|
expect(resolveLevelDisplaySizes({ bodyFontSize: 12 })).toEqual({
|
|
decorationSize: 10,
|
|
levelIconExplicitSize: 14,
|
|
});
|
|
});
|
|
|
|
it("uses the global icon font size for decorations and defers icon sizing to icon rules", () => {
|
|
expect(resolveLevelDisplaySizes({ bodyFontSize: 12, iconFontSize: 20 })).toEqual({
|
|
decorationSize: 20,
|
|
});
|
|
});
|
|
|
|
it("uses the level font size for all level display visuals", () => {
|
|
expect(resolveLevelDisplaySizes({ bodyFontSize: 12, iconFontSize: 20, levelFontSize: 16 })).toEqual({
|
|
decorationSize: 16,
|
|
levelIconExplicitSize: 16,
|
|
});
|
|
});
|
|
});
|