Skip to content

Commit 0c8929c

Browse files
committed
adding smoother animations
reord readme assets
1 parent 4563d4d commit 0c8929c

File tree

12 files changed

+26
-17
lines changed

12 files changed

+26
-17
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
![Snyk Vulnerabilities for GitHub Repo](https://img.shields.io/snyk/vulnerabilities/github/prabhuignoto/float-menu)
66
[![Depfu](https://badges.depfu.com/badges/3597df88718d346a7b41f08e31fe1331/overview.svg)](https://depfu.com/github/prabhuignoto/float-menu?project_id=15010)
77

8-
![logo](./src/readme-assets/logo.png)
8+
![logo](./readme-assets/logo.png)
99

1010
>Customizable Floating Menu for Vue 3
1111
12-
![app-home](./src/readme-assets/app-home.png)
12+
![app-home](./readme-assets/app-home.png)
1313

1414
[Edit on Stackblitz](https://stackblitz.com/edit/vue-mkrnwq?file=src/App.vue)
1515

@@ -50,7 +50,7 @@ The following snippet sets the default position of the menu as `top left` and de
5050

5151
## 📺 Demo
5252

53-
![demo](./src/readme-assets/demo.gif)
53+
![demo](./readme-assets/demo.gif)
5454

5555
## Props
5656

@@ -171,7 +171,7 @@ const menuData = [
171171
</float-menu>
172172
```
173173
174-
![example1](./src/readme-assets/example1.png)
174+
![example1](./readme-assets/example1.png)
175175
176176
### on-select
177177
@@ -204,7 +204,7 @@ setting this prop `flips` the menu content on the right edges of the screen. Thi
204204
</float-menu>
205205
```
206206
207-
![flip](./src/readme-assets/flip.png)
207+
![flip](./readme-assets/flip.png)
208208
209209
### Custom icon
210210
@@ -230,7 +230,7 @@ and here we render a custom text inside the Menu handle
230230
</float-menu>
231231
```
232232
233-
![example2](./src/readme-assets/example2.png)
233+
![example2](./readme-assets/example2.png)
234234
235235
## 🔨 Built with
236236

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@typescript-eslint/parser": "^4.2.0",
2424
"@vue/compiler-sfc": "^3.0.0",
2525
"eslint": "^7.9.0",
26-
"eslint-plugin-vue": "^7.0.0-beta.3",
26+
"eslint-plugin-vue": "^7.0.0-beta.4",
2727
"rollup": "^2.28.1",
2828
"rollup-plugin-buble": "^0.19.8",
2929
"rollup-plugin-commonjs": "^10.1.0",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/components/index.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
$cubic: cubic-bezier(0.25, 0.46, 0.45, 0.94);
2+
13
.menu-head-wrapper {
24
position: fixed;
5+
6+
&:not(.dragActive) {
7+
transition: left 0.2s $cubic, right 0.2s $cubic, top 0.2s $cubic, bottom 0.2s $cubic;
8+
}
39
}
410

511
.menu-head {
@@ -47,7 +53,7 @@
4753
background: #fff;
4854

4955
&.menuActive {
50-
animation: show 0.1s ease-in;
56+
animation: show 0.15s $cubic;
5157
visibility: visible;
5258
}
5359
}
@@ -61,9 +67,11 @@
6167
@keyframes show {
6268
0% {
6369
opacity: 0;
70+
transform: scale(0.95);
6471
}
6572

6673
100% {
6774
opacity: 1;
75+
transform: scale(1);
6876
}
6977
}

0 commit comments

Comments
 (0)