flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
38
VISUALIZACION/node_modules/polished/lib/mixins/wordWrap.js
generated
vendored
Executable file
38
VISUALIZACION/node_modules/polished/lib/mixins/wordWrap.js
generated
vendored
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = wordWrap;
|
||||
/**
|
||||
* Provides an easy way to change the `wordWrap` property.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...wordWrap('break-word')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${wordWrap('break-word')}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* const styles = {
|
||||
* overflowWrap: 'break-word',
|
||||
* wordWrap: 'break-word',
|
||||
* wordBreak: 'break-all',
|
||||
* }
|
||||
*/
|
||||
function wordWrap(wrap) {
|
||||
if (wrap === void 0) {
|
||||
wrap = 'break-word';
|
||||
}
|
||||
var wordBreak = wrap === 'break-word' ? 'break-all' : wrap;
|
||||
return {
|
||||
overflowWrap: wrap,
|
||||
wordWrap: wrap,
|
||||
wordBreak: wordBreak
|
||||
};
|
||||
}
|
||||
module.exports = exports.default;
|
||||
Loading…
Add table
Add a link
Reference in a new issue