Skip to content

Instantly share code, notes, and snippets.

@kvedantmahajan
Last active October 16, 2018 06:04
Show Gist options
  • Save kvedantmahajan/679ed370dcbed4ce68e34b3407846ab8 to your computer and use it in GitHub Desktop.
Save kvedantmahajan/679ed370dcbed4ce68e34b3407846ab8 to your computer and use it in GitHub Desktop.
{
this.openDrawer ? (
<VSideDrawer
title="Edit User"
close={this.toggleDrawer}
okText="Save"
okCallback={this.saveUser}
>
Body of drawer
</VSideDrawer>
) : null}
import styled from "vue-styled-components";
import { ModalWrap } from "../modal/styles";
export const DrawerWrap = ModalWrap.withComponent("div");
const drawerProps = {
position: {
type: String,
default: "right"
}
};
export const Drawer = styled("div", drawerProps)`
position: fixed;
top: 0;
right: -500px;
bottom: 0;
display: inline-block;
width: 500px;
border-radius: 0;
box-shadow: 0 0 2px 1px #666;
background: #fff;
font-size: 14px;
line-height: 1.5;
animation: slideIn 0.8s ease-in both;
@-webkit-keyframes slideIn {
100% {
right: 0;
}
}
@keyframes slideIn {
100% {
right: 0;
}
}
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment