Skip to content

Commit

Permalink
fix(fonts): fix fonts related properties
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleXBai committed Jul 26, 2024
1 parent b24a0c0 commit 1fac782
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/components/atoms/Legend/Legend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useThemeContext } from '../../styles/Theme';

interface LegendProps {
className?: string;
children?: React.ReactNode; // Add children prop
children?: React.ReactNode;
}

const StyledLegend = styled.legend`
Expand All @@ -18,9 +18,8 @@ const StyledLegend = styled.legend`
`;

const Legend = ({ className, children }: LegendProps) => {
// Destructure props including children
const theme = useThemeContext();
console.log('theme:', theme);

return (
<StyledLegend className={className} theme={theme}>
{children}
Expand Down
6 changes: 3 additions & 3 deletions src/components/molecules/RadioGroupField/RadioGroupField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ const RadioGroupField = ({
onChange(value);
}
};
console.log('theme:', theme);

return (
<Fieldset className={className}>
{label && (
{label ? (
<Legend className={classNames(theme?.legend?.className, theme?.legend?.lineHeightClassName)}>{label}</Legend>
)}
) : null}
<FlexRow {...flexRowProps}>
{items.map((item, index) => {
const checked = isControlled ? value === item.value : innerValue === item.value;
Expand Down

0 comments on commit 1fac782

Please sign in to comment.