UI: typography init flag to omit color class
This commit is contained in:
@@ -85,6 +85,9 @@ interface _TypographyProps<H extends Hierarchy> {
|
||||
tag?: Tag;
|
||||
class?: string;
|
||||
classList?: Record<string, boolean>;
|
||||
// Disable using the color prop
|
||||
// A font color is provided via class / classList or inherited
|
||||
useExternColor?: boolean;
|
||||
}
|
||||
|
||||
export const Typography = <H extends Hierarchy>(props: _TypographyProps<H>) => {
|
||||
@@ -92,7 +95,7 @@ export const Typography = <H extends Hierarchy>(props: _TypographyProps<H>) => {
|
||||
<Dynamic
|
||||
component={props.tag || "span"}
|
||||
class={cx(
|
||||
colorMap[props.color || "primary"],
|
||||
!props.useExternColor && colorMap[props.color || "primary"],
|
||||
props.inverted && "fnt-clr--inverted",
|
||||
sizeHierarchyMap[props.hierarchy][props.size] as string,
|
||||
weightMap[props.weight || "normal"],
|
||||
|
||||
Reference in New Issue
Block a user