flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
28
VISUALIZACION/node_modules/polished/lib/helpers/em.js.flow
generated
vendored
Executable file
28
VISUALIZACION/node_modules/polished/lib/helpers/em.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
// @flow
|
||||
import pixelsto from '../internalHelpers/_pxto'
|
||||
|
||||
/**
|
||||
* Convert pixel value to ems. The default base value is 16px, but can be changed by passing a
|
||||
* second argument to the function.
|
||||
* @function
|
||||
* @param {string|number} pxval
|
||||
* @param {string|number} [base='16px']
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* 'height': em('16px')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* height: ${em('16px')}
|
||||
* `
|
||||
*
|
||||
* // CSS in JS Output
|
||||
*
|
||||
* element {
|
||||
* 'height': '1em'
|
||||
* }
|
||||
*/
|
||||
const em: (value: string | number, base?: string | number) => string = pixelsto('em')
|
||||
export default em
|
||||
Loading…
Add table
Add a link
Reference in a new issue