Last active
December 16, 2015 01:31
-
-
Save dlmanning/f3dcacef0b675f9b3c5d to your computer and use it in GitHub Desktop.
How I make react components without react
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
import Icon from 'react-fa' | |
import hoverable from 'lib/hocs/hoverable' | |
import instyled, { flatKeyed } from 'instyled' | |
import cascade from 'cascade' | |
export const EditButton = hoverable( | |
instyled( | |
flatKeyed( | |
cascade({ | |
position: 'absolute', | |
top: 0, | |
right: 0, | |
padding: 7, | |
hover: { | |
color: 'black' | |
} | |
} | |
) | |
), { | |
component: Icon, | |
staticProps: { | |
name: 'edit' | |
} | |
} | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment