Skip to content
Snippets Groups Projects
Commit 7d64a9cc authored by Alf Eaton's avatar Alf Eaton
Browse files

Transform the menu arrow with CSS

parent e7a47b81
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,9 @@ class Menu extends React.Component {
const { open, selected } = this.state
return (
<div className={classes.root}>
<div className={classnames(classes.root, {
[classes.open]: open
})}>
<div>
<button
type="button"
......@@ -51,7 +53,7 @@ class Menu extends React.Component {
) : (
<span className={classes.placeholder}>{placeholder}</span>
)}
<span className={classes.arrow}>{ open ? '' : '' }</span>
<span className={classes.arrow}></span>
</button>
</div>
......
......@@ -27,6 +27,10 @@
font-size: 50%;
}
.open .arrow {
transform: scaleY(-1)
}
.menu {
position: absolute;
top: 0;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment