Skip to content

Commit

Permalink
linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mkue committed Nov 14, 2023
1 parent 23ccfc5 commit 36faf10
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
30 changes: 14 additions & 16 deletions ui/src/components/typography/typography.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,25 @@ export type TypographyProps<C extends ElementType> = {
lineHeight?: LineHeight;
} & ComponentPropsWithoutRef<C>;

export function Typography<C extends ElementType = 'p'>(
{
as,
size = 'md',
weight = 'normal',
color = undefined,
lineHeight = 'normal',
className,
children,
...props
}: TypographyProps<C>,
) {
export function Typography<C extends ElementType = 'p'>({
as,
size,
weight,
color,
lineHeight,
className,
children,
...props
}: TypographyProps<C>) {
const Component = as || 'p';
return (
<Component
className={twMerge(
classNames(
FONT_SIZE_MAP[size],
FONT_WEIGHT_MAP[weight],
FONT_COLOR_MAP[color] || '',
LINE_HEIGHT_MAP[lineHeight],
size && FONT_SIZE_MAP[size],
weight && FONT_WEIGHT_MAP[weight],
color && FONT_COLOR_MAP[color],
lineHeight && LINE_HEIGHT_MAP[lineHeight],
className,
),
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function RadioGroupFormItem({ active, title, donationInterval, lang }: RadioGrou

useEffect(() => {
setPreviewAmount(getDonationAmount(monthlyIncome, donationInterval));
}, [monthlyIncome]);
}, [monthlyIncome, donationInterval]);

return (
<FormItem>
Expand Down

0 comments on commit 36faf10

Please sign in to comment.