Skip to content

Commit

Permalink
fix: Pass along missing variant prop [skip pizza] (#3574)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Aug 27, 2024
1 parent f3036b9 commit 8ea145a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface Props {
variant: "data";
}

export const Headline: React.FC<Props> = ({ text, matchIndices }) => {
export const Headline: React.FC<Props> = ({ text, matchIndices, variant }) => {
const isHighlighted = (index: number) =>
matchIndices.some(([start, end]) => index >= start && index <= end);

Expand All @@ -17,7 +17,7 @@ export const Headline: React.FC<Props> = ({ text, matchIndices }) => {
{text.split("").map((char, index) => (
<Typography
component="span"
variant="data"
variant={variant}
key={`headline-character-${index}`}
sx={(theme) => ({
fontWeight: isHighlighted(index) ? FONT_WEIGHT_BOLD : "regular",
Expand Down

0 comments on commit 8ea145a

Please sign in to comment.