mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 05:13:32 +00:00
refactor(timer): allow multiline secondary text
This commit is contained in:
committed by
Carlos Valente
parent
48f2511764
commit
18e6f0d7c4
@@ -63,7 +63,7 @@ export function PipTimer({ viewSettings }: PipTimerProps) {
|
||||
|
||||
// gather presentation styles
|
||||
const resolvedTimerColour = getTimerColour(viewSettings, undefined, showWarning, showDanger);
|
||||
const { timerFontSize, externalFontSize } = getEstimatedFontSize(display, secondaryContent);
|
||||
const timerFontSize = getEstimatedFontSize(display, secondaryContent);
|
||||
const userStyles = {
|
||||
...(resolvedTimerColour && { '--timer-colour': resolvedTimerColour }),
|
||||
};
|
||||
@@ -84,11 +84,10 @@ export function PipTimer({ viewSettings }: PipTimerProps) {
|
||||
>
|
||||
{display}
|
||||
</div>
|
||||
<div
|
||||
className={cx(['secondary', !secondaryContent && 'secondary--hidden'])}
|
||||
style={{ fontSize: `${externalFontSize}vw` }}
|
||||
>
|
||||
{secondaryContent}
|
||||
<div className={cx(['secondary', !secondaryContent && 'secondary--hidden'])}>
|
||||
<FitText mode='multi' min={12} max={256}>
|
||||
{secondaryContent}
|
||||
</FitText>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user