alpha to hexa
Useful for colour values, the 'AA' in #RRGGBBAA
hexa = Math.round(i*255).toString(16)
for (i=0; i<=1; i+=0.05) {
console.log(i, Math.round(i*255).toString(16))
}
module.exports = someViewFramework.extend({ | |
element : ".js-thatElement", | |
events : { | |
"click" : "doStuff", | |
"keypress" : "doStuffKeyboard" | |
}, | |
doStuff : function() { | |
// foo |
Useful for colour values, the 'AA' in #RRGGBBAA
hexa = Math.round(i*255).toString(16)
for (i=0; i<=1; i+=0.05) {
console.log(i, Math.round(i*255).toString(16))
}
Useful for colour values, the 'AA' in #RRGGBBAA
alpha = parseInt(hexa,16)/255
for (i=0; i<256; i++) {
console.log(i.toString(16), i/255)
}
A JavaScript library that manages the UI.
React enables you to express in a declarative way what your UI should look like at any point in time; while building your app with little, reusable blocks: components.
So, about this short conversation about containing thing, some examples where I think this is not such an obvious move as it sounds.
import React from 'react';
export class Icon extends React.Component {
/* ... */
getDefaultProps() {
return {
.Icon{ | |
display: inline-block; | |
vertical-align: middle; | |
color: inherit; | |
} | |
.Icon--defaultSize{ | |
width: 1rem; | |
} | |
.Icon-subcontainer{ |
I hereby claim:
To claim this, I am signing this object:
17 ┆ jsStuff => | |
18 ┆ switch (beeTypeFromJs(jsStuff)) { | |
>19 ┆ | Some(output) => output | |
20 ┆ | None => `baa | |
21 ┆ }; | |
This has type: | |
beeType | |
But somewhere wanted: | |
stuff4 |