Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
refactor(modular-scale): change modular-scale function api
Browse files Browse the repository at this point in the history
BREAKING CHANGE:  uncurry modular-scale
  • Loading branch information
mg901 committed Jan 27, 2019
1 parent a1e9148 commit 17b99cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/calculators/modular-scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ const calcResult = (fontSize, bases, position) => fontSize * bases[position];
const calcBaseHigh = (ratio, base) => Math.pow(ratio, 1) * base[0];

// For the needs of Typographist
export const dumpModularScale: (Breakpoint) => (number) => number = ({
base,
ratio,
}) => (step) => {
export const dumpModularScale: (number, Breakpoint) => number = (
step,
{ base, ratio },
) => {
if (base.length === 1) {
return Math.pow(ratio, step) * parseFloat(base);
}
Expand Down

0 comments on commit 17b99cf

Please sign in to comment.