Skip to content

Commit

Permalink
Update typography and Tiptap classes, fix styling and break word issue
Browse files Browse the repository at this point in the history
  • Loading branch information
agjs committed Apr 18, 2024
1 parent 0197e4c commit c707932
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@programmer_network/yail",
"version": "1.0.155",
"version": "1.0.156",
"description": "Programmer Network's official UI library for React",
"author": "Aleksandar Grbic - (https://programmer.network)",
"publishConfig": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports[`AuthorCard component > renders correctly 1`] = `
</div>
<div>
<h2
class="text-2xl sm:text-3xl md:text-4xl lg:text-5xl my-4 text-primary wordbreak font-bold !my-0"
class="text-2xl sm:text-3xl md:text-4xl lg:text-5xl my-4 text-primary break-words overflow-hidden font-bold !my-0"
>
John Doe
</h2>
Expand Down
2 changes: 1 addition & 1 deletion src/Components/CTA/__snapshots__/CTA.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`CTA component > renders correctly - snapshot test 1`] = `
class="flex flex-col gap-2"
>
<h2
class="text-2xl sm:text-3xl md:text-4xl lg:text-5xl my-4 text-primary wordbreak font-bold text-primary-text-color"
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"
>
Test Title
</h2>
Expand Down
8 changes: 4 additions & 4 deletions src/Components/Card/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import classNames from "classnames";
import { FC } from "react";

import { Anchor, H2, Paragraph } from "Components/Typography";
import { Anchor, H3, Paragraph } from "Components/Typography";

import URLUtils from "Utils/URL";

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

{URLUtils.isExternalLink(titleUrl) ? (
<Anchor href={titleUrl} target='_blank'>
<H2 margin='none' className='flex items-center justify-start gap-2'>
<H3 margin='none' className='flex items-center justify-start gap-2'>
{title}
</H2>
</H3>
</Anchor>
) : (
<NavLink to={titleUrl}>
<H2 margin='none'>{title}</H2>
<H3 margin='none'>{title}</H3>
</NavLink>
)}
<Paragraph>{description}</Paragraph>
Expand Down
12 changes: 6 additions & 6 deletions src/Components/Inputs/Tiptap/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,32 @@ export const toolbarItemToClassName = {
[TIPTAP_TOOLBAR_ITEMS.HEADING_1]: {
tagName: "h1",
classes:
"text-3xl sm:text-4xl md:text-5xl lg:text-6xl my-4 text-primary wordbreak font-bold"
"text-3xl sm:text-4xl md:text-5xl lg:text-6xl my-4 text-primary break-words overflow-hidden font-bold"
},
[TIPTAP_TOOLBAR_ITEMS.HEADING_2]: {
tagName: "h2",
classes:
"text-2xl sm:text-3xl md:text-4xl lg:text-5xl my-4 text-primary wordbreak font-bold"
"text-2xl sm:text-3xl md:text-4xl lg:text-5xl my-4 text-primary break-words overflow-hidden font-bold"
},
[TIPTAP_TOOLBAR_ITEMS.HEADING_3]: {
tagName: "h3",
classes:
"text-xl sm:text-2xl md:text-3xl lg:text-4xl my-4 text-primary wordbreak font-bold"
"text-xl sm:text-2xl md:text-3xl lg:text-4xl my-4 text-primary break-words overflow-hidden font-bold"
},
[TIPTAP_TOOLBAR_ITEMS.HEADING_4]: {
tagName: "h4",
classes:
"text-lg sm:text-xl md:text-2xl lg:text-3xl my-4 text-primary wordbreak font-bold"
"text-lg sm:text-xl md:text-2xl lg:text-3xl my-4 text-primary break-words overflow-hidden font-bold"
},
[TIPTAP_TOOLBAR_ITEMS.HEADING_5]: {
tagName: "h5",
classes:
"text-md sm:text-lg md:text-xl lg:text-2xl my-4 text-primary wordbreak font-bold"
"text-md sm:text-lg md:text-xl lg:text-2xl my-4 text-primary break-words overflow-hidden font-bold"
},
[TIPTAP_TOOLBAR_ITEMS.HEADING_6]: {
tagName: "h6",
classes:
"text-sm sm:text-md md:text-lg lg:text-xl my-4 text-primary wordbreak font-bold"
"text-sm sm:text-md md:text-lg lg:text-xl my-4 text-primary break-words overflow-hidden font-bold"
},
[TIPTAP_TOOLBAR_ITEMS.UNORDERED_LIST]: {
tagName: "ul",
Expand Down

0 comments on commit c707932

Please sign in to comment.