Skip to content

Commit 7f26092

Browse files
authored
fix: change colors of today and free keywords in event details (#301)
* fix: change colors of today and free keywords in event details * fix: add color as variable
1 parent 46de805 commit 7f26092

9 files changed

Lines changed: 24 additions & 0 deletions

File tree

apps/events-helsinki/src/domain/event/eventKeywords/EventKeywords.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ const EventKeywords: React.FC<Props> = ({
6969
<KeywordTag
7070
whiteOnly={whiteOnly}
7171
featured={!whiteOnly}
72+
isFreeEvent
7273
keyword={t('categories.labelFree')}
7374
onClick={withActions ? handleClick('isFree') : undefined}
7475
/>
7576
)}
7677
{today && (
7778
<KeywordTag
7879
whiteOnly={whiteOnly}
80+
isToday
7981
keyword={t('categories.labelToday')}
8082
onClick={
8183
withActions ? handleClick('dateType', DATE_TYPES.TODAY) : undefined

apps/events-helsinki/src/styles/globals.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ main {
4141
--color-input: var(--color-success);
4242
--color-input-dark: var(--color-success-dark);
4343
--color-input-selected-text: var(--color-white);
44+
--color-keyword-free-event: #afe4de;
4445

4546
/*hcrc styles*/
4647
--hcrc-color-link-show-all: var(--color-success-dark);

apps/hobbies-helsinki/src/domain/event/eventKeywords/EventKeywords.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ const EventKeywords: React.FC<Props> = ({
6969
<KeywordTag
7070
whiteOnly={whiteOnly}
7171
featured={!whiteOnly}
72+
isFreeEvent
7273
keyword={t('categories.labelFree')}
7374
onClick={withActions ? handleClick('isFree') : undefined}
7475
/>
7576
)}
7677
{today && (
7778
<KeywordTag
7879
whiteOnly={whiteOnly}
80+
isToday
7981
keyword={t('categories.labelToday')}
8082
onClick={
8183
withActions ? handleClick('dateType', DATE_TYPES.TODAY) : undefined

apps/hobbies-helsinki/src/styles/globals.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ main {
2727
--color-input: var(--color-fog);
2828
--color-input-dark: var(--color-coat-of-arms-dark);
2929
--color-input-selected-text: var(--color-black-90);
30+
--color-keyword-free-event: #afe4de;
3031

3132
/*hcrc styles*/
3233
--hcrc-color-link-show-all: var(--color-coat-of-arms-dark);

apps/sports-helsinki/src/domain/event/eventKeywords/EventKeywords.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ const EventKeywords: React.FC<Props> = ({
6969
<KeywordTag
7070
whiteOnly={whiteOnly}
7171
featured={!whiteOnly}
72+
isFreeEvent
7273
keyword={t('categories.labelFree')}
7374
onClick={withActions ? handleClick('isFree') : undefined}
7475
/>
7576
)}
7677
{today && (
7778
<KeywordTag
7879
whiteOnly={whiteOnly}
80+
isToday
7981
keyword={t('categories.labelToday')}
8082
onClick={
8183
withActions ? handleClick('dateType', DATE_TYPES.TODAY) : undefined

apps/sports-helsinki/src/domain/venue/venueKeywords/VenueKeywords.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ const VenueKeywords: React.FC<Props> = ({
9292
<KeywordTag
9393
whiteOnly={whiteOnly}
9494
featured={!whiteOnly}
95+
isFreeEvent
9596
keyword={t('categories.labelFree')}
9697
/* Disable onClick as per LIIKUNTA-411 comment */
9798
/* onClick={handleClick('isFree')} */

apps/sports-helsinki/src/styles/globals.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ main {
4040
--color-input: var(--color-success);
4141
--color-input-dark: var(--color-success-dark);
4242
--color-input-selected-text: var(--color-white);
43+
--color-keyword-free-event: #afe4de;
4344

4445
/*hcrc styles*/
4546
--hcrc-color-link-show-all: var(--color-success-dark);

packages/components/src/components/keyword/KeywordTag.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ interface Props {
1010
whiteOnly?: boolean;
1111
featured?: boolean;
1212
transparent?: boolean;
13+
isToday?: boolean;
14+
isFreeEvent?: boolean;
1315
hideOnMobile?: boolean;
1416
keyword: string;
1517
onClick?: () => void;
@@ -21,6 +23,8 @@ const KeywordTag: FunctionComponent<Props> = ({
2123
whiteOnly,
2224
hideOnMobile,
2325
transparent,
26+
isToday,
27+
isFreeEvent,
2428
keyword,
2529
className,
2630
onClick,
@@ -44,6 +48,8 @@ const KeywordTag: FunctionComponent<Props> = ({
4448
blackOnMobile && styles.blackOnMobile,
4549
hideOnMobile && styles.hideOnMobile,
4650
transparent && styles.transparent,
51+
isToday && styles.isToday,
52+
isFreeEvent && styles.isFreeEvent,
4753
className
4854
)}
4955
onClick={handleClick}

packages/components/src/components/keyword/keyword.module.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,12 @@
2020
color: var(--color-white);
2121
}
2222
}
23+
24+
&.isToday {
25+
background-color: var(--color-summer-medium-light);
26+
}
27+
28+
&.isFreeEvent {
29+
background-color: var(--color-keyword-free-event);
30+
}
2331
}

0 commit comments

Comments
 (0)