Skip to content

Commit c707932

Browse files
committed
Update typography and Tiptap classes, fix styling and break word issue
1 parent 0197e4c commit c707932

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@programmer_network/yail",
3-
"version": "1.0.155",
3+
"version": "1.0.156",
44
"description": "Programmer Network's official UI library for React",
55
"author": "Aleksandar Grbic - (https://programmer.network)",
66
"publishConfig": {

src/Components/AuthorCard/__snapshots__/AuthorCard.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ exports[`AuthorCard component > renders correctly 1`] = `
2525
</div>
2626
<div>
2727
<h2
28-
class="text-2xl sm:text-3xl md:text-4xl lg:text-5xl my-4 text-primary wordbreak font-bold !my-0"
28+
class="text-2xl sm:text-3xl md:text-4xl lg:text-5xl my-4 text-primary break-words overflow-hidden font-bold !my-0"
2929
>
3030
John Doe
3131
</h2>

src/Components/CTA/__snapshots__/CTA.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ exports[`CTA component > renders correctly - snapshot test 1`] = `
1515
class="flex flex-col gap-2"
1616
>
1717
<h2
18-
class="text-2xl sm:text-3xl md:text-4xl lg:text-5xl my-4 text-primary wordbreak font-bold text-primary-text-color"
18+
class="text-2xl sm:text-3xl md:text-4xl lg:text-5xl my-4 text-primary break-words overflow-hidden font-bold text-primary-text-color"
1919
>
2020
Test Title
2121
</h2>

src/Components/Card/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import classNames from "classnames";
22
import { FC } from "react";
33

4-
import { Anchor, H2, Paragraph } from "Components/Typography";
4+
import { Anchor, H3, Paragraph } from "Components/Typography";
55

66
import URLUtils from "Utils/URL";
77

@@ -37,13 +37,13 @@ const Card: FC<ICard> = ({ data, className, NavLink }) => {
3737

3838
{URLUtils.isExternalLink(titleUrl) ? (
3939
<Anchor href={titleUrl} target='_blank'>
40-
<H2 margin='none' className='flex items-center justify-start gap-2'>
40+
<H3 margin='none' className='flex items-center justify-start gap-2'>
4141
{title}
42-
</H2>
42+
</H3>
4343
</Anchor>
4444
) : (
4545
<NavLink to={titleUrl}>
46-
<H2 margin='none'>{title}</H2>
46+
<H3 margin='none'>{title}</H3>
4747
</NavLink>
4848
)}
4949
<Paragraph>{description}</Paragraph>

src/Components/Inputs/Tiptap/constants.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,32 @@ export const toolbarItemToClassName = {
2828
[TIPTAP_TOOLBAR_ITEMS.HEADING_1]: {
2929
tagName: "h1",
3030
classes:
31-
"text-3xl sm:text-4xl md:text-5xl lg:text-6xl my-4 text-primary wordbreak font-bold"
31+
"text-3xl sm:text-4xl md:text-5xl lg:text-6xl my-4 text-primary break-words overflow-hidden font-bold"
3232
},
3333
[TIPTAP_TOOLBAR_ITEMS.HEADING_2]: {
3434
tagName: "h2",
3535
classes:
36-
"text-2xl sm:text-3xl md:text-4xl lg:text-5xl my-4 text-primary wordbreak font-bold"
36+
"text-2xl sm:text-3xl md:text-4xl lg:text-5xl my-4 text-primary break-words overflow-hidden font-bold"
3737
},
3838
[TIPTAP_TOOLBAR_ITEMS.HEADING_3]: {
3939
tagName: "h3",
4040
classes:
41-
"text-xl sm:text-2xl md:text-3xl lg:text-4xl my-4 text-primary wordbreak font-bold"
41+
"text-xl sm:text-2xl md:text-3xl lg:text-4xl my-4 text-primary break-words overflow-hidden font-bold"
4242
},
4343
[TIPTAP_TOOLBAR_ITEMS.HEADING_4]: {
4444
tagName: "h4",
4545
classes:
46-
"text-lg sm:text-xl md:text-2xl lg:text-3xl my-4 text-primary wordbreak font-bold"
46+
"text-lg sm:text-xl md:text-2xl lg:text-3xl my-4 text-primary break-words overflow-hidden font-bold"
4747
},
4848
[TIPTAP_TOOLBAR_ITEMS.HEADING_5]: {
4949
tagName: "h5",
5050
classes:
51-
"text-md sm:text-lg md:text-xl lg:text-2xl my-4 text-primary wordbreak font-bold"
51+
"text-md sm:text-lg md:text-xl lg:text-2xl my-4 text-primary break-words overflow-hidden font-bold"
5252
},
5353
[TIPTAP_TOOLBAR_ITEMS.HEADING_6]: {
5454
tagName: "h6",
5555
classes:
56-
"text-sm sm:text-md md:text-lg lg:text-xl my-4 text-primary wordbreak font-bold"
56+
"text-sm sm:text-md md:text-lg lg:text-xl my-4 text-primary break-words overflow-hidden font-bold"
5757
},
5858
[TIPTAP_TOOLBAR_ITEMS.UNORDERED_LIST]: {
5959
tagName: "ul",

0 commit comments

Comments
 (0)