What do you want to save?
Add Code snippet
New code examples
-
Other 2021-10-17 23:36:07
styled-components example 2 with props
const Input = styled.input.attrs(props => ({ // we can define static props type: "text", // or we can define dynamic ones size: props.size || "1em", }))` color: palevioletred; font-size: 1em; border: 2px solid palevio... Add solution -
Javascript 2021-08-31 16:18:01
computed property in javascript
/* Computed Property Names is ES6 feature which allows the names of object properties in JavaScript OBJECT LITERAL NOTATION to be determined dynamically, i.e. computed. */ let propertyname = 'c'; let obj ={ a : 11, b : 12, [propertyname] : 13 ... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5