diff --git a/src/features/CompareBoard/index.ts b/src/features/CompareBoard/index.ts index 7109a36..0477963 100644 --- a/src/features/CompareBoard/index.ts +++ b/src/features/CompareBoard/index.ts @@ -2,6 +2,7 @@ export { fitColumns } from './lib'; export { __resetBoard, type BoardStore, + FRAME_ROLE_GAP, getBoard, MAX_COLUMNS, type RoleTypography, diff --git a/src/features/CompareBoard/model/index.ts b/src/features/CompareBoard/model/index.ts index 770145f..ac29d08 100644 --- a/src/features/CompareBoard/model/index.ts +++ b/src/features/CompareBoard/model/index.ts @@ -1,4 +1,7 @@ -export { MAX_COLUMNS } from './const/const'; +export { + FRAME_ROLE_GAP, + MAX_COLUMNS, +} from './const/const'; export { __resetBoard, type BoardStore, diff --git a/src/widgets/Board/ui/FocalFrame/FocalFrame.stories.svelte b/src/widgets/Board/ui/FocalFrame/FocalFrame.stories.svelte new file mode 100644 index 0000000..679fa1d --- /dev/null +++ b/src/widgets/Board/ui/FocalFrame/FocalFrame.stories.svelte @@ -0,0 +1,26 @@ + + + + {#snippet template()} +
+ +
+ {/snippet} +
diff --git a/src/widgets/Board/ui/FocalFrame/FocalFrame.svelte b/src/widgets/Board/ui/FocalFrame/FocalFrame.svelte new file mode 100644 index 0000000..0e40bc6 --- /dev/null +++ b/src/widgets/Board/ui/FocalFrame/FocalFrame.svelte @@ -0,0 +1,74 @@ + + + +
0 ? `${reservedHeight}px` : undefined} + bind:clientWidth={frameWidth} +> + {#if focal} + {@render roleBlock('header', fonts.header)} + {@render roleBlock('body', fonts.body)} + {/if} +
+ +{#snippet roleBlock(role: Role, font: UnifiedFont | undefined)} + {@const typo = board.typo[role]} + {#if font} + + board.setSpecimen(role, text)} + /> + + {:else} + + board.setSpecimen(role, text)} + /> + {/if} +{/snippet}