From 01f94fa2a7e17959c9e5bd2bf1337471b791fde3 Mon Sep 17 00:00:00 2001 From: Grigorii Prudnikov Date: Sun, 5 Nov 2023 17:08:28 +0500 Subject: [PATCH] Update quarters card --- .../Quarter/CardContent/CardContent.module.css | 18 ++++-------------- .../Layers/Quarter/CardContent/CardContent.tsx | 14 ++++++++++++-- components/UI/Button/Button.module.css | 17 ++++++----------- components/UI/Button/Button.tsx | 15 ++++++++++----- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/components/Layers/Quarter/CardContent/CardContent.module.css b/components/Layers/Quarter/CardContent/CardContent.module.css index fc3c834f..71958db5 100644 --- a/components/Layers/Quarter/CardContent/CardContent.module.css +++ b/components/Layers/Quarter/CardContent/CardContent.module.css @@ -15,26 +15,16 @@ position: relative; svg { position: relative; - top: 0; + top: 2px; left: 2px; path { fill: #000; } } a { - color: #000; - height: 35px; + border-radius: 8px; + font-size: 16px; width: 100%; - background-color: #ffd400; - display: flex; - justify-content: center; - align-items: center; - border-radius: 6px; - } - a:hover { - color: #000; - path { - fill: #000; - } + text-align: center; } } diff --git a/components/Layers/Quarter/CardContent/CardContent.tsx b/components/Layers/Quarter/CardContent/CardContent.tsx index d6259128..4ef7b4ab 100644 --- a/components/Layers/Quarter/CardContent/CardContent.tsx +++ b/components/Layers/Quarter/CardContent/CardContent.tsx @@ -1,4 +1,5 @@ import { QuarterObject } from 'components/Layers/Quarter/quarterObject'; +import { Button, ButtonSize, ButtonType } from 'components/UI/Button/Button'; import { Header } from 'components/UI/Card/components/Header/Header'; import { Info } from 'components/UI/Card/components/Info/Info'; import { Section } from 'components/UI/Card/components/Section/Section'; @@ -21,10 +22,19 @@ export function QuarterCardContent({ placemark }: QuarterCardContentProps) {
- + {/* Посмотреть телефон и почту квартального  - + */} +
diff --git a/components/UI/Button/Button.module.css b/components/UI/Button/Button.module.css index ccd8e948..47be173d 100644 --- a/components/UI/Button/Button.module.css +++ b/components/UI/Button/Button.module.css @@ -5,22 +5,18 @@ font-size: 15px; line-height: 1.33; cursor: pointer; - transition: .15s ease; -} - -.button:hover { - filter: contrast(0.75); -} - -.button:active { - filter: contrast(0.65); + transition: all 0.15s ease; } .button_yellow { - background: #FFD400; + background: #ffd400; color: black; } +.button_yellow:hover { + background: #e1bb00; +} + .button_black { background: black; color: white; @@ -34,7 +30,6 @@ padding: 12px 32px; } - @media screen and (width >= 768px) { .button { font-size: 16px; diff --git a/components/UI/Button/Button.tsx b/components/UI/Button/Button.tsx index 6789acb0..e2e754cb 100644 --- a/components/UI/Button/Button.tsx +++ b/components/UI/Button/Button.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import classNames from 'classnames'; import styles from './Button.module.css'; @@ -23,22 +22,28 @@ const buttonStylesBySize: Record = { }; type TButtonProps = { - text: string; + text?: string; type: ButtonType; size: ButtonSize; onClick: VoidFunction; link?: string; + children?: React.ReactNode; }; -export function Button({ text, type, size, onClick, link }: TButtonProps) { +export function Button({ text, type, size, onClick, link, children }: TButtonProps) { const className = classNames(styles.button, buttonStylesByType[type], buttonStylesBySize[size]); if (link) { return ( - {text} + + {text || children} + ); } + return ( - + ); }