This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MyComponent: React.FC<{ theme: MyTheme }> = styled(({ theme, ...props }) => <Box {...props} />)` | |
&& { | |
text-align: center; | |
padding-top: ${props => props.theme.spacing(2)}px; | |
} | |
` | |
export const Wrapper: React.FC<WrapperProps> = ({ ...props }) => { | |
const theme: MyTheme = useTheme() | |
return ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I had problems getting mouse movement events working in ncurses, but after | |
// some research, it seems as if this is how you can do it. The magic is in the | |
// printf("\033[?1003h\n") which was the missing piece in the puzzle for me | |
// (see console_codes(4) for more information). 1003 means here that all events | |
// (even position updates) will be reported. | |
// | |
// This seems to work in at least three X-based terminals that I've tested: | |
// xterm, urxvt and gnome-terminal. It doesn't work when testing in a "normal" | |
// terminal, with GPM enabled. Perhaps something for the next gist version? :) |