Skip to content

Commit c2af494

Browse files
authored
Merge pull request #270 from AppQuality/UN-94-page-header
Un 94 page header
2 parents 104a998 + 711bd29 commit c2af494

File tree

13 files changed

+276
-3
lines changed

13 files changed

+276
-3
lines changed

src/assets/icons/clock-stroke.svg

Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 8 additions & 0 deletions
Loading
Lines changed: 8 additions & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 35 additions & 0 deletions
Loading
Lines changed: 8 additions & 0 deletions
Loading

src/common/components/Pill.tsx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import {
2+
Span,
3+
Tag,
4+
theme as globalTheme,
5+
} from '@appquality/unguess-design-system';
6+
import { FC, ReactNode } from 'react';
7+
import styled from 'styled-components';
8+
9+
const StyledTag = styled(Tag)`
10+
pointer-events: none;
11+
padding: 0;
12+
margin-right: ${({ theme }) => theme.space.xs};
13+
`;
14+
15+
const StyledChild = styled(Span)`
16+
color: ${({ theme }) => theme.palette.grey[700]};
17+
`;
18+
19+
const StyledAvatar = styled(StyledTag.Avatar)`
20+
margin-left: 0 !important;
21+
margin-right: ${({ theme }) => theme.space.xxs} !important;
22+
`;
23+
24+
const PillContainer = styled.div`
25+
font-size: ${({ theme }) => theme.fontSizes.sm};
26+
margin-right: ${({ theme }) => theme.space.xs};
27+
`;
28+
29+
export const Pill: FC<{
30+
title: string;
31+
background?: string;
32+
color?: string;
33+
icon?: ReactNode;
34+
}> = ({ background, color, icon, title, children }) => (
35+
<PillContainer>
36+
<StyledTag isPill hue={background ?? 'white'} size="large">
37+
{icon && <StyledAvatar>{icon}</StyledAvatar>}
38+
<Span isBold style={{ color: color ?? globalTheme.palette.grey[700] }}>
39+
{title}
40+
</Span>
41+
</StyledTag>
42+
{children && <StyledChild>{children}</StyledChild>}
43+
</PillContainer>
44+
);

src/locales/en/translation.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
"__BREADCRUMB_ITEM_DASHBOARD": "My campaigns",
1515
"__BREADCRUMB_ITEM_SERVICES": "Services",
1616
"__CAMPAIGN_CARD_EMPTY_TITLE_LABEL": "Untitled",
17+
"__CAMPAIGN_PAGE_BUTTON_DETAIL_BUG": "Go to Bug detail",
18+
"__CAMPAIGN_PAGE_INFO_HEADER_DESKTOP": "Desktop",
19+
"__CAMPAIGN_PAGE_INFO_HEADER_FROM_DATE_TO_DATE": "<0><0>{{start_date}}</0></0> to <3><0>{{end_date}}</0></3>",
20+
"__CAMPAIGN_PAGE_INFO_HEADER_MOBILE": "Mobile",
21+
"__CAMPAIGN_PAGE_INFO_HEADER_TEST_TIMING": "Test duration",
22+
"__CAMPAIGN_PAGE_INFO_HEADER_USERS_NUMBER": "N° Users",
1723
"__CAMPAIGN_GENERATE_REPORT_CARD_BUTTON_LABEL": "Download",
1824
"__CAMPAIGN_GENERATE_REPORT_CARD_META": "Bugs Report",
1925
"__CAMPAIGN_PAGE_REPORTS_CARDS_DOWNLOAD_LABEL": "Download now",

src/locales/it/translation.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
"__BREADCRUMB_ITEM_DASHBOARD": "Le mie campagne",
1515
"__BREADCRUMB_ITEM_SERVICES": "Servizi",
1616
"__CAMPAIGN_CARD_EMPTY_TITLE_LABEL": "Senza Titolo",
17+
"__CAMPAIGN_PAGE_BUTTON_DETAIL_BUG": "Vai al dettaglio bug",
18+
"__CAMPAIGN_PAGE_INFO_HEADER_DESKTOP": "Desktop",
19+
"__CAMPAIGN_PAGE_INFO_HEADER_FROM_DATE_TO_DATE": "<0><0>{{start_date}}</0></0> to <3><0>{{end_date}}</0></3>",
20+
"__CAMPAIGN_PAGE_INFO_HEADER_MOBILE": "Mobile",
21+
"__CAMPAIGN_PAGE_INFO_HEADER_TEST_TIMING": "Durata test",
22+
"__CAMPAIGN_PAGE_INFO_HEADER_USERS_NUMBER": "N° Utenti",
1723
"__CAMPAIGN_GENERATE_REPORT_CARD_BUTTON_LABEL": "Scarica",
1824
"__CAMPAIGN_GENERATE_REPORT_CARD_META": "Bugs Report",
1925
"__CAMPAIGN_PAGE_REPORTS_CARDS_DOWNLOAD_LABEL": "Download now",

0 commit comments

Comments
 (0)