From d56f7d8144ccb8d3f6ec9c8be0e8461931949a3f Mon Sep 17 00:00:00 2001 From: Artur Janas Date: Tue, 22 Aug 2023 13:37:53 +0100 Subject: [PATCH] chore: improve styling --- .../GlossarySearch/GlossaryCard.css | 11 ++++------ .../GlossarySearch/GlossaryCard.tsx | 14 ++++++------- .../GlossarySearch/GlossarySearch.css | 6 ++++++ src/components/GlossarySearch/index.tsx | 6 +++++- .../GlossaryTermPage/GlossaryTermPage.css | 17 ++++++++++------ .../GlossaryTermPageAside.tsx | 8 ++------ src/components/icons/OpenBookIcon.tsx | 20 +++++++++++++++++++ 7 files changed, 54 insertions(+), 28 deletions(-) create mode 100644 src/components/icons/OpenBookIcon.tsx diff --git a/src/components/GlossarySearch/GlossaryCard.css b/src/components/GlossarySearch/GlossaryCard.css index d6507a36..e1c46a88 100644 --- a/src/components/GlossarySearch/GlossaryCard.css +++ b/src/components/GlossarySearch/GlossaryCard.css @@ -3,19 +3,19 @@ .glossary-term__card { display: flex; flex-direction: column; + justify-content: space-between; gap: .5rem; - padding: 1rem; + padding: 1rem 1.5rem; border: 1px solid var(--border-color); border-radius: 8px; transition: all 0.2s ease-in-out; - background-color: var(--nu10); border: 1px solid var(--border-light); } .glossary-term__card-title { font-size: 1.5rem; - margin-bottom: 0; + margin-bottom: .5rem; font-weight: bold; display: flex; gap: 0.5rem; @@ -30,7 +30,7 @@ } .glossary-term__card:hover { - background-color: #eeeef7; + background-color: #fafafa; transform: translateY(-.25rem) scale(1.02); } @@ -44,7 +44,6 @@ background-position: 0 0; display: inline; transition: .2s ease-in; - padding-left: 1.5rem; } @@ -57,8 +56,6 @@ align-items: center; gap: 0.325rem; width: fit-content; - padding-left: 1.5rem; - } .glossary-term__card-link:hover .arrow-icon { diff --git a/src/components/GlossarySearch/GlossaryCard.tsx b/src/components/GlossarySearch/GlossaryCard.tsx index 1ed7e320..1ee1a7a3 100644 --- a/src/components/GlossarySearch/GlossaryCard.tsx +++ b/src/components/GlossarySearch/GlossaryCard.tsx @@ -2,18 +2,16 @@ import React from 'react'; import { GlossaryTermType } from './index'; import './GlossaryCard.css'; import ArrowIcon from '../icons/ArrowIcon'; -import BookIcon from '../icons/BookIcon'; const GlossaryTerm = ({ term }: { term: GlossaryTermType }) => (
-
-

- - {term.termTitle} -

-
+
+
+

{term.termTitle}

+
-
{term.definition}
+
{term.definition}
+
{term.slug && ( { <>
-

FinOps Glossary

+

+ + FinOps Glossary +

( ); diff --git a/src/components/icons/OpenBookIcon.tsx b/src/components/icons/OpenBookIcon.tsx new file mode 100644 index 00000000..b158915a --- /dev/null +++ b/src/components/icons/OpenBookIcon.tsx @@ -0,0 +1,20 @@ +import React from 'react'; + +const OpenBookIcon = ({ size }: { size?: { width: string; height: string } }) => ( + +); + +export default OpenBookIcon;