joyent-portal/packages/icons/src/rotate.js

14 lines
210 B
JavaScript
Raw Normal View History

2017-11-23 14:18:38 +02:00
const rotate = {
up: 180,
right: 90,
down: 0,
left: -90
};
export default ({ children, direction = 'down' }) =>
children({
style: {
transform: `rotate(${rotate[direction]}deg)`
}
});