aboutsummaryrefslogtreecommitdiff
path: root/src/components/side_drawer/side_drawer.js
blob: b1b7701c47c748f4bba80a6240a5086b5be06d76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const SideDrawer = {
  props: [ 'activatePanel', 'closed', 'clickoutside' ],
  computed: {
    currentUser () {
      return this.$store.state.users.currentUser
    }
  },
  methods: {
    gotoPanel (panel) {
      this.activatePanel(panel)
      this.clickoutside && this.clickoutside()
    },
    clickedOutside () {
      if (typeof this.clickoutside === 'function') {
        this.clickoutside()
      }
    }
  }
}

export default SideDrawer