2.0.7 • Published 1 year ago

spacer_m_p v2.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

What is it?

Package for getting space for margin or padding.

Installation

Run npm i spacer_m_p or yarn add spacer_m_p

Use

import getSpace from "spacer_m_p";

  • Option 1: getSpace(1) returns 4px (string);
  • Option 2: getSpace(1, false) returns 4 (number);
  • Option 3: getSpace() returns 24px (string);

Parameters

The function accepts two parameters, spacer (number) and withPx (boolean);

By default getSpace() returns 24px (string);

Spacings, which function may accept and values, which will be returned:

FunctionSpacerReturn value: number
getSpace(1, false)14
getSpace(2, false)28
getSpace(3, false)316
getSpace(4, false)420
getSpace(5, false)524
getSpace(6, false)632
getSpace(7, false)748
getSpace(8, false)864
getSpace(9, false)996
getSpace(10, false)10160

FunctionSpacerReturn value: string
getSpace(1)1"4px"
getSpace(2)2"8px"
getSpace(3)3"16px"
getSpace(4)4"20px"
getSpace(5)5"24px"
getSpace(6)6"32px"
getSpace(7)7"48px"
getSpace(8)8"64px"
getSpace(9)9"96px"
getSpace(10)10"160px"

FunctionSpacerReturn value: string
getSpace()"24px"
2.0.3

1 year ago

2.0.2

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago