🎨 🐛 Coloration des lignes de la fiche de paie

pull/481/head
Mael 2019-07-12 12:30:31 +02:00
parent 3150b4fa3b
commit 0110af7dce
2 changed files with 9 additions and 6 deletions

View File

@ -85,13 +85,13 @@ export default compose(
<Value
nilValueSymbol="—"
unit="€"
style={{ backgroundColor: lightestColour }}>
customCSS="background-color: var(--lightestColour)">
{cotisation.montant.partPatronale}
</Value>
<Value
nilValueSymbol="—"
unit="€"
style={{ backgroundColor: lightestColour }}>
customCSS="background-color: var(--lightestColour)">
{cotisation.montant.partSalariale}
</Value>
</Fragment>

View File

@ -23,8 +23,10 @@ let booleanTranslations = {
en: { true: 'Yes', false: 'No' }
}
let style = `
let style = customStyle => `
font-family: 'Courier New', Courier, monospace;
${customStyle}
`
export default withLanguage(
@ -35,7 +37,8 @@ export default withLanguage(
numFractionDigits,
children,
negative,
language
language,
customCSS = ''
}) => {
/* Either an entire rule object is passed, or just the right attributes and the value as a JSX child*/
let nodeValue = value === undefined ? children : value
@ -46,7 +49,7 @@ export default withLanguage(
nodeValue === null
)
return (
<span css={style} className="value">
<span css={style(customCSS)} className="value">
-
</span>
)
@ -71,7 +74,7 @@ export default withLanguage(
)
return nodeValue == undefined ? null : (
<span css={style} className="value">
<span css={style(customCSS)} className="value">
{negative ? '-' : ''}
{formattedValue}
</span>