Skip to content

Instantly share code, notes, and snippets.

@dlmanning
Last active December 16, 2015 01:31
Show Gist options
  • Save dlmanning/f3dcacef0b675f9b3c5d to your computer and use it in GitHub Desktop.
Save dlmanning/f3dcacef0b675f9b3c5d to your computer and use it in GitHub Desktop.
How I make react components without react
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