Skip to content

Commit

Permalink
ADD: Style update
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinfaveri committed May 10, 2020
1 parent 6b6f39e commit 1e14c6e
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 70 deletions.
3 changes: 3 additions & 0 deletions docs/docs/changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ title: 'Changelog'

# Changelog

## 5.7.3
- Style update for TwemojiPicker

## 5.7.2

- Added a Vue slot which enables the usage of TwemojiPicker as a headless component when using TwemojiTextarea component
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/twemoji-textarea-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The value of this prop represents whether the textarea is enabled.

### componentColor
- Type: ``string``
- Default: ``'#EBEBEB'``
- Default: ``'#f0f0f0'``
- Valid Props: ``Any CSS valid color.``

Define the component color style.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kevinfaguiar/vue-twemoji-picker",
"version": "5.7.2",
"version": "5.7.3",
"main": "dist/vue-twemoji-picker.umd.min.js",
"module": "dist/vue-twemoji-picker.esm.min.js",
"unpkg": "dist/vue-twemoji-picker.min.js",
Expand Down
4 changes: 2 additions & 2 deletions src/components/PopupEmoji.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#popper-container {
padding: 0;
background: #ebebeb;
background: #f7f7f7;
border: none;
border-radius: 3px;
animation: fadein 300ms;
Expand All @@ -64,7 +64,7 @@
z-index: -1;
content: '';
transform: rotate(45deg);
background: #ebebeb;
background: #f0f0f0;
width: 24px;
height: 24px;
}
Expand Down
46 changes: 23 additions & 23 deletions src/components/PopupSkins.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#popper-skins-container {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
padding: 0;
background: #f2f2f2;
background: #f7f7f7;
border: none;
border-radius: 3px;
animation: fadein 300ms;
Expand All @@ -60,7 +60,7 @@
z-index: -1;
content: '';
transform: rotate(45deg);
background: #f2f2f2;
background: #f0f0f0;
width: 24px;
height: 24px;
}
Expand Down Expand Up @@ -92,7 +92,7 @@
import Vue from 'vue';
import {
popperGenerator,
defaultModifiers
defaultModifiers,
} from '@popperjs/core/lib/popper-lite';
import offset from '@popperjs/core/lib/modifiers/offset';
import preventOverflow from '@popperjs/core/lib/modifiers/preventOverflow';
Expand All @@ -112,54 +112,54 @@ export default Vue.extend({
debouncedPopperOpen: false as boolean,
popperInstance: null as any | null,
holdingInterval: null as any,
closeOnClickaway: true as boolean
closeOnClickaway: true as boolean,
};
},
props: {
disabled: {
default: false,
type: Boolean as () => boolean
type: Boolean as () => boolean,
},
offset: {
default: () => [0, 30],
type: Array as () => Array<number>
type: Array as () => Array<number>,
},
emojiList: {
required: true,
type: Array as () => Array<EmojiSkin>
type: Array as () => Array<EmojiSkin>,
},
clickEmoji: {
required: true,
type: Function as () => Function
}
type: Function as () => Function,
},
},
computed: {
createPopper() {
const defaultModifiersObj = [
...defaultModifiers,
offset,
preventOverflow,
arrow
arrow,
];
return popperGenerator({
defaultModifiers: defaultModifiersObj
defaultModifiers: defaultModifiersObj,
});
}
},
},
mounted(): void {
this.containerRef = this.$refs.container;
},
watch: {
popperOpen: function(val): void {
popperOpen: function (val): void {
this.$emit('popperOpenChanged', val);
setTimeout(() => {
this.debouncedPopperOpen = val;
}, 300);
},
closeOnClickaway: function(val): void {
closeOnClickaway: function (val): void {
this.$emit('closeOnClickaway', val);
}
},
},
methods: {
clickAwayPopper(): void {
Expand All @@ -183,16 +183,16 @@ export default Vue.extend({
{
name: 'offset',
options: {
offset: this.offset
}
offset: this.offset,
},
},
{
name: 'arrow',
options: {
element: '#skins-arrow'
}
}
]
element: '#skins-arrow',
},
},
],
}
);
this.$refs.container.setAttribute('data-show', true);
Expand All @@ -208,7 +208,7 @@ export default Vue.extend({
},
setCloseOnClickaway(bool: boolean): void {
this.closeOnClickaway = bool;
}
}
},
},
});
</script>
Loading

0 comments on commit 1e14c6e

Please sign in to comment.