Skip to content

Commit

Permalink
feat(toast): add animation
Browse files Browse the repository at this point in the history
  • Loading branch information
endv-bogdanb committed Jun 29, 2023
1 parent 0e8a280 commit f55d951
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/bee-q/src/components/toast/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ Type: `Promise<void>`

| Part | Description |
| ------------- | -------------------------------------------------------- |
| `"base"` | `<div>` container element of toast bq-icon component. |
| `"base"` | The `<div>` container of the internal bq-icon component. |
| `"icon"` | |
| `"icon-info"` | `<div>` container element of toast icon component. |
| `"svg"` | `<svg>` element inside toast bq-icon component. |
| `"wrapper"` | The component's internal wrapper of the Toast component. |
| `"icon-info"` | The `<div>` container that holds the icon component. |
| `"svg"` | The `<svg>` element of the internal bq-icon component. |
| `"wrapper"` | The component's internal wrapper inside the shadow DOM. |


## Dependencies
Expand Down
2 changes: 1 addition & 1 deletion packages/bee-q/src/components/toast/scss/bq-toast.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@import './bq-toast.variables';

:host {
@apply inline-block;
@apply inline-block animate-slide-in will-change-transform;
}

.bq-toast {
Expand Down
14 changes: 14 additions & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,20 @@ const config: Config = {
xxl3: 'var(--bq-spacing-xxl3)',
xxl4: 'var(--bq-spacing-xxl4)',
},
keyframes: {
'fade-in': {
'0%': { opacity: '0' },
'100%': { opacity: '1' },
},
'slide-up': {
'0%': {
transform: 'translateY(10px)',
},
},
},
animation: {
'slide-in': 'fade-in 0.3s ease, slide-up 0.3s ease',
},
},
},
plugins: [
Expand Down

0 comments on commit f55d951

Please sign in to comment.