Skip to content

Instantly share code, notes, and snippets.

View robinsandborg's full-sized avatar

Robin Sandborg robinsandborg

View GitHub Profile
enum unicode_names {
ARING_LC,
ARING_UC
};
const uint32_t PROGMEM unicode_map[] = {
[ARING_LC] = 0x00E5, // å
[ARING_UC] = 0x00C5, // Å
};
class ControlledSlider extends React.Component {
state = {
values: [this.props.defaultValue],
update: [this.props.defaultValue]
}
onUpdate = update => {
this.setState({ update })
this.props.onUpdate && this.props.onUpdate(update[0])
}
class SliderWrapper extends React.Component {
state = {
sum: value,
sliderSum: value,
step: step
}
onInputChange = value => {
if (value) {
const sum = parseInt(value, 10)
@robinsandborg
robinsandborg / Caret.js
Created February 23, 2018 15:53
Weird styled-components bug
import React from "react"
import PropTypes from "prop-types"
import styled from "styled-components"
const CaretIcon = styled.svg`
width: 12px;
transition: fill 0.2s ease;
`
const Caret = ({ className }) => (