Skip to content

Commit

Permalink
moew
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertCarreras committed Oct 24, 2024
1 parent a78818f commit 8b3c5cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/gestalt/src/boxTransforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ const transformNumberOrPassthrough =
(selector: string): MarginFunctorType =>
(m) => {
if (typeof m === 'number') {
return bind(rangeWithZero(selector), whitespace)(m);
return bind(rangeWithZero(selector), whitespace)(m * 100);
}

if (m === 'auto') {
Expand Down Expand Up @@ -266,7 +266,7 @@ const minWidth: Functor<Dimension> = (d) => fromInlineStyle({ minWidth: d });
const opacityMap = mapClassName((name) => styles[name]);
const opacity: Functor<Opacity> = (val) => {
if (val > 0 && val < 1) {
return opacityMap(range('opacity0')(val * 0.1));
return opacityMap(range('opacity0')(val * 10));
}
return opacityMap(range('opacity')(val));
};
Expand Down
2 changes: 1 addition & 1 deletion packages/gestalt/src/transforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const mapping =
export const range =
(scale: string): ((n: number) => Style) =>
(n): Style =>
fromClassName(`${scale}${n < 0 ? `N${Math.abs(n * 100)}` : n * 100}`);
fromClassName(`${scale}${n < 0 ? `N${Math.abs(n)}` : n}`);

export const rangeWithZero =
(scale: string): ((n: number) => Style) =>
Expand Down

0 comments on commit 8b3c5cc

Please sign in to comment.