Skip to content

Commit c096f6e

Browse files
committed
style: Prevent horizontal scroll caused by overflowing long titles
1 parent ac97878 commit c096f6e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

components/snippets/Title.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
const styleProp = { overflowWrap: 'break-word', hyphens: 'auto' };
2+
13
const Title = ({ title }) => {
2-
return <h2>{title}</h2>;
4+
return <h2 style={styleProp}>{title}</h2>;
35
};
46

57
export default Title;

0 commit comments

Comments
 (0)