mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-22 00:13:45 -05:00
* 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>
20 lines
596 B
TypeScript
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 }} />;
|
|
}
|