From fc93e1a35449d39b64464cc3b1feb6286bf61881 Mon Sep 17 00:00:00 2001 From: Andrey_Bogoroditskiy Date: Tue, 12 Mar 2024 11:04:13 +0300 Subject: [PATCH] - added title - added body - added section base --- .eslintrc | 1 - package.json | 12 +- src/components/action-link/action-link.scss | 9 +- .../error-boundary/error-boundary.tsx | 6 +- src/components/footer/footer.scss | 5 +- src/components/footer/footer.tsx | 7 +- src/components/image-banner/image-banner.scss | 16 +-- src/components/image-banner/image-banner.tsx | 6 +- .../information-card/information-card.scss | 21 +-- .../information-card/information-card.tsx | 8 +- src/components/news-card/news-card.scss | 31 +---- src/components/news-card/news-card.tsx | 8 +- src/components/section-base/section-base.scss | 23 ++++ src/components/section-base/section-base.tsx | 30 +++++ src/components/text/text.scss | 124 +---------------- src/components/text/text.tsx | 61 --------- src/components/text/typography.tsx | 16 +++ src/components/title/title.scss | 12 ++ src/components/title/title.tsx | 26 ++++ src/components/wave-banner/wave-banner.scss | 9 +- src/components/wave-banner/wave-banner.tsx | 6 +- .../embedded-section/embedded-section.scss | 17 --- .../embedded-section/embedded-section.tsx | 9 +- .../hero-article/hero-article.scss | 15 +-- .../hero-article/hero-article.tsx | 6 +- src/features/hero-section/hero-section.scss | 32 +---- .../information-section.scss | 19 +-- .../information-section.tsx | 16 ++- src/features/news-section/news-section.scss | 20 +-- src/features/news-section/news-section.tsx | 9 +- .../project-card/project-card.scss | 4 +- .../project-card/project-card.tsx | 10 +- .../projects-section/projects-section.scss | 11 +- .../projects-section/projects-section.tsx | 9 +- src/pages/not-found/not-found.scss | 18 +-- src/pages/not-found/not-found.tsx | 8 +- src/styles/mixins/_index.scss | 1 + .../mixins/partial-underline.mixin.scss | 2 +- src/styles/mixins/typography.mixin.scss | 47 +++++++ yarn.lock | 126 +++++++++--------- 40 files changed, 343 insertions(+), 473 deletions(-) create mode 100644 src/components/section-base/section-base.scss create mode 100644 src/components/section-base/section-base.tsx delete mode 100644 src/components/text/text.tsx create mode 100644 src/components/text/typography.tsx create mode 100644 src/components/title/title.scss create mode 100644 src/components/title/title.tsx rename src/{components => features}/embedded-section/embedded-section.scss (57%) rename src/{components => features}/embedded-section/embedded-section.tsx (57%) create mode 100644 src/styles/mixins/typography.mixin.scss diff --git a/.eslintrc b/.eslintrc index 1a2350d..d2f34a7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -203,7 +203,6 @@ "no-void": "off", "no-continue": "off", "no-unused-vars": "off", - "no-case-declarations": "off", "no-restricted-imports": [ "error", { diff --git a/package.json b/package.json index 2b941cb..61b25db 100644 --- a/package.json +++ b/package.json @@ -30,11 +30,11 @@ "@graphql-codegen/client-preset": "^4.2.4", "@graphql-typed-document-node/core": "^3.2.0", "@types/graphql": "^14.5.0", - "@types/node": "^20.11.25", - "@types/react": "^18.2.64", + "@types/node": "^20.11.26", + "@types/react": "^18.2.65", "@types/react-dom": "^18.2.21", - "@typescript-eslint/eslint-plugin": "^7.1.1", - "@typescript-eslint/parser": "^7.1.1", + "@typescript-eslint/eslint-plugin": "^7.2.0", + "@typescript-eslint/parser": "^7.2.0", "@vitejs/plugin-react": "^4.2.1", "dotenv-cli": "^7.4.1", "eslint": "^8.57.0", @@ -51,8 +51,8 @@ "lint-staged": "^15.2.2", "prettier": "^3.2.5", "sass": "^1.71.1", - "typescript": "^5.4.2", - "vite": "^5.1.5", + "typescript": "^5.4.0", + "vite": "^5.1.6", "vite-plugin-svgr": "^4.2.0" } } diff --git a/src/components/action-link/action-link.scss b/src/components/action-link/action-link.scss index b94037d..4605aec 100644 --- a/src/components/action-link/action-link.scss +++ b/src/components/action-link/action-link.scss @@ -1,14 +1,13 @@ @use "@/styles/responsive-mixins"; +@use "@/styles/mixins"; .action-link { --_action-color: var(--action-color, var(--primary)); + @include mixins.h5; + font-weight: 700; position: relative; display: inline-flex; align-items: center; - font-family: Lato, sans-serif; - font-size: 1rem; - font-weight: 700; - line-height: 1.5; color: var(--_action-color); text-decoration: none; width: fit-content; @@ -42,6 +41,6 @@ } @include responsive-mixins.lg { - font-size: 1.25rem; + @include mixins.h4; } } diff --git a/src/components/error-boundary/error-boundary.tsx b/src/components/error-boundary/error-boundary.tsx index 744cc55..c1d287c 100644 --- a/src/components/error-boundary/error-boundary.tsx +++ b/src/components/error-boundary/error-boundary.tsx @@ -1,4 +1,6 @@ import { Component, ErrorInfo, ReactNode } from "react"; +import { Typography } from "@/components/text/typography.tsx"; +import { Title } from "@/components/title/title.tsx"; interface Props { children?: ReactNode; @@ -33,8 +35,8 @@ export class ErrorBoundary extends Component { return ( // TODO: Ask designer about component
-

Oops, something went wrong

-

There are some issues while loading the page

+ Oops, something went wrong + There are some issues while loading the page
); } diff --git a/src/components/footer/footer.scss b/src/components/footer/footer.scss index 146a652..20f7c51 100644 --- a/src/components/footer/footer.scss +++ b/src/components/footer/footer.scss @@ -1,4 +1,5 @@ @use "@/styles/responsive-mixins"; +@use "@/styles/mixins"; .footer { display: flex; @@ -26,9 +27,8 @@ } .social-title { - font-size: 1.25rem; + @include mixins.h4; font-weight: 600; - line-height: 1.5; } .social-links { @@ -52,7 +52,6 @@ font-family: "Open Sans", sans-serif; font-size: 0.75rem; font-weight: 600; - line-height: 1.5; gap: 12px; } diff --git a/src/components/footer/footer.tsx b/src/components/footer/footer.tsx index 2c7dd11..2c7f826 100644 --- a/src/components/footer/footer.tsx +++ b/src/components/footer/footer.tsx @@ -1,4 +1,5 @@ import { Link } from "react-router-dom"; +import { Title } from "@/components/title/title.tsx"; import { ComponentSharedSocialIcon, PageEntity, @@ -19,7 +20,11 @@ export const Footer = ({ socialLinks, heading, navigation }: FooterProps) => {