mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-03-02 12:00:43 +00:00
fix: utilities format and change height func
This commit is contained in:
parent
ab73b7ef03
commit
07d9509db7
@ -60,13 +60,11 @@ export const formatToFixed4 = (value: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const getHeightPercentages = (amountOfElements: number) => {
|
export const getHeightPercentages = (amountOfElements: number) => {
|
||||||
let percentages
|
let percentages = 100
|
||||||
|
|
||||||
if (amountOfElements === 1) {
|
if (amountOfElements > 1) {
|
||||||
percentages = 100
|
|
||||||
} else {
|
|
||||||
percentages = 100 / amountOfElements
|
percentages = 100 / amountOfElements
|
||||||
}
|
}
|
||||||
|
|
||||||
return `${percentages}%`
|
return `${percentages}%`
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user