Files
actual/packages/desktop-client/src/components/FinancialText.tsx
Matt Fiddaman a35fdf4d18 make colours on reports page consistent (#6672)
* add colour definitions

* chart theme definitions

* replace with new colour variables

* clean up chart-theme

* merge fixes

* note

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6672

* coderabbit

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-21 18:06:00 +00:00

20 lines
596 B
TypeScript

import React, { type ComponentPropsWithoutRef, type ElementType } from 'react';
import { styles, type CSSProperties } from '@actual-app/components/styles';
import { Text } from '@actual-app/components/text';
type FinancialTextProps<T extends ElementType = typeof Text> = {
as?: T;
style?: CSSProperties;
} & Omit<ComponentPropsWithoutRef<T>, 'style' | 'as'>;
export function FinancialText<T extends ElementType = typeof Text>({
as,
style,
...props
}: FinancialTextProps<T>) {
const Component = as ?? Text;
return <Component {...props} style={{ ...style, ...styles.tnum }} />;
}