Skip to content

Commit

Permalink
add title and value customization options
Browse files Browse the repository at this point in the history
Signed-off-by: Kipruto <[email protected]>
  • Loading branch information
kelvinkipruto committed Jul 16, 2024
1 parent f0c281b commit dedba17
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/hurumap-core/src/LocationHighlight/LocationHighlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ import { Box, Typography } from "@mui/material";
import React from "react";

const LocationHighlight = React.forwardRef(function LocationHighlight(
{ title, value, isLoading, ...props },
{
title,
value,
isLoading,
TitleTypographyProps,
ValueTypographyProps,
...props
},
ref,
) {
return (
Expand All @@ -16,16 +23,20 @@ const LocationHighlight = React.forwardRef(function LocationHighlight(
>
<Typography
variant="subtitle1"
{...TitleTypographyProps}
sx={(theme) => ({
fontSize: theme.typography.pxToRem(10),
fontWeight: 300,
lineHeight: 24 / 10,
textTransform: "uppercase",
...TitleTypographyProps?.sx,
})}
>
{title}
</Typography>
<Typography variant="body2">{isLoading ? "…" : value}</Typography>
<Typography variant="body2" {...ValueTypographyProps}>
{isLoading ? "…" : value}
</Typography>
</Box>
);
});
Expand Down

0 comments on commit dedba17

Please sign in to comment.