Browse Source

Merge pull request #496 from mmaton/font-fallback

Font fallback
master
Meriadec Pillet 7 years ago
committed by GitHub
parent
commit
312fbae7e9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      src/components/base/FormattedVal/__tests__/__snapshots__/FormattedVal.test.js.snap
  2. 3
      src/styles/helpers.js
  3. 2
      static/i18n/en/emptyState.yml
  4. 2
      static/i18n/fr/emptyState.yml

10
src/components/base/FormattedVal/__tests__/__snapshots__/FormattedVal.test.js.snap

@ -2,7 +2,7 @@
exports[`components FormattedVal renders a formatted val 1`] = `
<div
className="k45ou1-0 iqaJGf e345n3-0 ghfAOi"
className="k45ou1-0 iqaJGf e345n3-0 cbufQL"
color="#66be54"
>
4
@ -11,7 +11,7 @@ exports[`components FormattedVal renders a formatted val 1`] = `
exports[`components FormattedVal renders a percent 1`] = `
<div
className="k45ou1-0 iqaJGf e345n3-0 ghfAOi"
className="k45ou1-0 iqaJGf e345n3-0 cbufQL"
color="#66be54"
>
30 %
@ -20,7 +20,7 @@ exports[`components FormattedVal renders a percent 1`] = `
exports[`components FormattedVal shows code 1`] = `
<div
className="k45ou1-0 iqaJGf e345n3-0 ghfAOi"
className="k45ou1-0 iqaJGf e345n3-0 cbufQL"
color="#66be54"
>
BTC 4
@ -29,7 +29,7 @@ exports[`components FormattedVal shows code 1`] = `
exports[`components FormattedVal shows sign 1`] = `
<div
className="k45ou1-0 iqaJGf e345n3-0 ghfAOi"
className="k45ou1-0 iqaJGf e345n3-0 cbufQL"
color="#66be54"
>
+ 4
@ -38,7 +38,7 @@ exports[`components FormattedVal shows sign 1`] = `
exports[`components FormattedVal shows sign 2`] = `
<div
className="k45ou1-0 iqaJGf e345n3-0 dBXPqF"
className="k45ou1-0 iqaJGf e345n3-0 eZFsmG"
color="#ea2e49"
>
- 4

3
src/styles/helpers.js

@ -26,9 +26,10 @@ export const lighten = (c: string, a: number) =>
export const ff = (v: string) => {
const [font, type = 'Regular'] = v.split('|')
const { style, weight } = fontFamilies[font][type]
const fallback = fontFamilies[font].fallback || 'Arial'
return {
fontFamily: font,
fontFamily: `${font}, ${fallback}`,
fontWeight: weight,
fontStyle: style,
}

2
static/i18n/en/emptyState.yml

@ -1,5 +1,5 @@
sidebar:
text: You don’t have any account for the moment. Press the + button to create an account
text: You don’t have any accounts at the moment. Press the + button to create an account
dashboard:
title: This is a title, use it with caution
desc: Please create a new account or recover an old account from your Ledger device.

2
static/i18n/fr/emptyState.yml

@ -1,6 +1,6 @@
---
sidebar:
text: You don’t have any account for the moment. Press the + button to create an account
text: You don’t have any accounts at the moment. Press the + button to create an account
dashboard:
title: This is a title, use it with caution
desc: Please create a new account or recover an old account from your Ledger device.

Loading…
Cancel
Save