Skip to content

Commit ba538e3

Browse files
Merge pull request #269 from mayuran-deriv/mayuran/font-token-style-issues
fix: font issues
2 parents 476248f + b14b9ae commit ba538e3

File tree

7 files changed

+26
-9
lines changed

7 files changed

+26
-9
lines changed

src/features/Apiexplorer/styles.module.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
align-items: stretch;
4747
gap: 10px;
4848
z-index: 2;
49-
p,
5049
span {
5150
color: var(--ifm-font-color-base);
5251
}

src/features/dashboard/components/api-token-table/api-table.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
flex-direction: column;
2525
border: 1px solid var(--opacity-black-100);
2626
border-radius: 32px;
27-
p,
27+
2828
h3 {
2929
color: var(--ifm-font-color-base);
3030
}

src/features/dashboard/components/api-token-table/responsive-table.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,26 @@ type TResponsiveTableProps = {
1414
type TAccordionItemProps = {
1515
label: string;
1616
value: React.ReactNode;
17+
isToken?: boolean;
1718
};
1819

19-
const AccordionItem: React.FC<TAccordionItemProps> = ({ label, value }) => (
20+
const AccordionItem: React.FC<TAccordionItemProps> = ({ label, value, isToken }) => (
2021
<div className={`accordion_item accordion_item_column`}>
2122
<div className='accordion_item__label'>{label}</div>
22-
<div className={`accordion_item__value accordion_item__value_column`}>{value}</div>
23+
<div
24+
className={`accordion_item__value accordion_item__value_column ${
25+
isToken ? 'accordion_item__value_token' : ''
26+
}`}
27+
>
28+
{value}
29+
</div>
2330
</div>
2431
);
2532

2633
const generateContent = (token: TTokenType) => {
2734
return (
2835
<div>
29-
<AccordionItem label={translate({ message: 'Token' })} value={token.token} />
36+
<AccordionItem label={translate({ message: 'Token' })} value={token.token} isToken />
3037
<AccordionItem label={translate({ message: 'Account type' })} value={<AccountTypeCell />} />
3138
<AccordionItem
3239
label={translate({ message: 'Token scopes' })}

src/features/dashboard/components/apps-table/responsive-table.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
&__value {
1919
text-align: end;
2020
justify-content: end;
21+
&_token {
22+
font-family: var(--ibm-font-family);
23+
}
2124
&_row {
2225
text-align: start;
2326
justify-content: start;

src/features/dashboard/components/common-table/common-table.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,16 @@ const CommonTable = <T extends object>({
7070
maxWidth: cell.column.maxWidth > 1000 ? 'auto' : cell.column.maxWidth,
7171
}}
7272
>
73-
<Text>{cell.render('Cell', getCustomCellProps(cell))}</Text>
73+
<Text
74+
style={{
75+
fontFamily:
76+
cell.column.id === 'token'
77+
? ' var(--ibm-font-family) !important'
78+
: 'inherit',
79+
}}
80+
>
81+
{cell.render('Cell', getCustomCellProps(cell))}
82+
</Text>
7483
</td>
7584
);
7685
})}

src/features/dashboard/components/token-register/token-register.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@
5151
width: 100%;
5252
z-index: 10;
5353
margin-bottom: 1.5rem;
54-
p {
55-
color: var(--ifm-font-color-base);
56-
}
5754
}
5855
.token_register__scopes,
5956
.token_register__name {

src/styles/index.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@use 'utility' as *;
22
@use 'mixins' as *;
33
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');
4+
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;700&display=swap');
45

56
/**
67
* Any CSS included here will be global. The classic template
@@ -13,6 +14,7 @@
1314

1415
:root {
1516
--inter-font-family: 'Inter', sans-serif;
17+
--ibm-font-family: 'IBM Plex Sans', sans-serif;
1618
--ifm-font-color-base: #181c25;
1719
--ifm-color-primary: #2e8555;
1820
--ifm-color-primary-dark: #29784c;

0 commit comments

Comments
 (0)