UNPKG

react-jam-ui

Version:

React JAM UI components

85 lines (75 loc) 2.33 kB
$default = json('../Input/default.json', { hash: true }); $layoutDefault = json('../Layout/default.json', { hash: true }); $custom = json('../../../../ui.config.json', { hash: true, optional: true }); $inputs = typeof($custom) != 'null' ? $custom.$inputs : $default.$inputs; $sizes = typeof($custom) != 'null' ? $custom.$sizes : $layoutDefault.$sizes; input-type-1($params) { background: $params.default.bg; border-color: $params.default.border; color: $params.default.color; border-radius: $params.default.radius; } .textarea-container { position: relative; .textarea { font-family: inherit; font-size: 14px; line-height: 32px; margin: 0; outline: none; padding: 0 10px; width: 100%; border-radius: 3px; border: 1px solid #666666; &::-webkit-input-placeholder { color:#777777; opacity: 0.6; transition: opacity 0.3s ease; } &::-moz-placeholder { color:#777777; opacity: 0.6; transition: opacity 0.3s ease; } &:focus { border-color: #0f90fd; box-shadow: 0 0 0 1px #0f90fd; position: relative; z-index: 3; &::-webkit-input-placeholder { opacity: 0; } &::-moz-placeholder { opacity: 0; } } for type, params in $sizes { if (type == 'default') { & { height: params.height*5; line-height: params.height; font-size: params[font-size]; padding: 0 (params.height/3); } } else { &.{type} { height: params.height*5; line-height: params.height; font-size: params[font-size]; padding: 0 (params.height/3); } } } for type, params in $inputs { if (type == 'default') { & { input-type-1(params) } } else { &.input-{type} { input-type-1(params) } } } } }