bootstrap-styled-utils
v1.0.2
Published
UMD module for helper functions used as utilities in bootstrap-styled
Downloads
171
Maintainers
Readme
bootstrap-styled-utils
bootstrap-styled-utils are utils function used in our bootstrap-styled components.
Master
Dev
Table of Contents
Installation
npm install bootstrap-styled-utils --saveChangelog
- View Changelog
Utilities
- obj
unitUtils- const
UNIT:{ EM, REM, PX, PERCENT }: constants - obj
math:{ addition, subtract, multiply, divide }: math operation - fn
detectUnit: detect the unit of a value - fn
rmUnit: remove the unit from a value - fn
toPercent: convert to percentage
- const
- fn
parseTransition: return a transitionList[{ property, duration, timingFunction, delay }]from a css transition rule. - fn
toHashCode: return a hash code. - fn
getTetherAttachment: return attachment{ attachment, tragetAttachment }from position. - Array
tetherAttachements: list of tether position. - fn
getScrollbarWidth: get the width of the scrollbar. - fn
setScrollbarWidth: set the width of the scrollbar to the body style. - fn
isBodyOverflowing: return true if body is overflowing. - fn
getOriginalBodyPadding: return original body padding. - fn
conditionallyUpdateScrollbar: fix scrollbar depending on navbar classes.
Quick start
Clone project
git clone ssh://[email protected]:20024/styled-components/bootstrap-styled-utils.gitInstall dependencies
npm installBuild project
npm run buildRun unit test
npm testWatch unit test
npm run test:watchWatch the /dist directory
npm run build:dist:watchWatch the /lib directory
npm run build:lib:watchContribute
master is used to release the version.
masteronly accept merge requests fromdev
dev is the development branch. It should be used by developers for applying their merge requests.
If you wish to implement new features, you will need to do a merge request including your change on the dev branch.
git checkout dev
git checkout $(whoami)-dev
git push -u origin $(whoami)-dev You can now start working on your branch.
License
Licensed under the MIT License, Copyright © 2017-present Yeutech Company Limited.
See LICENSE for more information.
