diff options
author | eug-vs <eug-vs@keemail.me> | 2020-04-18 20:44:55 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-04-18 20:44:55 +0300 |
commit | 9272b0af3d7b2fba4738a341a1f2776243e0e515 (patch) | |
tree | a0c315933d53e87614e806ba0b151234fb400977 /src/lib/ContentSection/ContentSection.tsx | |
parent | 2c5fa193541eb8b74974731d01312f73951bca17 (diff) | |
download | react-benzin-9272b0af3d7b2fba4738a341a1f2776243e0e515.tar.gz |
style: manually fix some errors
Diffstat (limited to 'src/lib/ContentSection/ContentSection.tsx')
-rw-r--r-- | src/lib/ContentSection/ContentSection.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ContentSection/ContentSection.tsx b/src/lib/ContentSection/ContentSection.tsx index 6b27bba..28b1ad5 100644 --- a/src/lib/ContentSection/ContentSection.tsx +++ b/src/lib/ContentSection/ContentSection.tsx @@ -26,11 +26,11 @@ const useStyles = makeStyles(theme => ({ const ContentSection: React.FC<PropTypes> = ({ sectionName, children, level = 0 }) => { const classes = useStyles(); - level += 2; // Make everything smaller - if (level > 6) level = 6; + let adjustedLevel = level + 2; // Make everything smaller + if (adjustedLevel > 6) adjustedLevel = 6; type Variant = 'h3' | 'h4' | 'h5' | 'h6'; - const variant: Variant = `h${level}` as Variant; + const variant: Variant = `h${adjustedLevel}` as Variant; return ( <> |