We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a64a0c0 + a087e5f commit 919d4cbCopy full SHA for 919d4cb
components/preview/Preview.jsx
@@ -149,6 +149,10 @@ const Preview = () => {
149
target="_blank"
150
rel="noreferrer"
151
className="inline-flex items-center gap-1 social-media"
152
+ // Prevent text overflowing, If the socialMedia.link string is longer than 32 characters, apply the wordWrap and display styles to this <a> tag.
153
+ // wordWrap: "break-word" breaks the text onto the next line if it's too long,
154
+ // display: "inline-block" is necessary for wordWrap to work on an inline element like <a>.
155
+ style={socialMedia.link.length > 32 ? { wordWrap: "break-word", display: "inline-block" } : {}}
156
>
157
{icons.map((icon, index) => {
158
if (icon.name === socialMedia.socialMedia.toLowerCase()) {
0 commit comments