Skip to content

Commit

Permalink
feat: overlay improvements (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
NateWaldschmidt authored Jul 15, 2024
1 parent c116341 commit 048a990
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## v2.0.85

- Improve `Overlay` interface
- Add `Minus` icon
- Add `Integrations` icon

## v2.0.84

- Improve `Overlay` flexibility
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lob/ui-components",
"version": "2.0.84",
"version": "2.0.85",
"engines": {
"node": ">=20.2.0",
"npm": ">=10.2.0"
Expand Down
3 changes: 3 additions & 0 deletions src/components/Icon/svgs/Integrations.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/Icon/svgs/Minus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/components/Icon/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ export const IconName = {
FUTURE: 'Future',
GEAR: 'Gear',
GIFT: 'Gift',
INTEGRATIONS: 'Integrations',
IMAGE_SEARCH: 'ImageSearch',
LAYER_GROUP: 'LayerGroup',
LAYERS: 'Layers',
LIGHTNING: 'Lightning',
LOCATION_PIN: 'LocationPin',
MONEY_BILL: 'MoneyBill',
MINUS: 'Minus',
NAV_ARROW_LEFT: 'NavArrowLeft',
NEXT: 'Next',
NOTES: 'Notes',
Expand Down
13 changes: 11 additions & 2 deletions src/components/Overlay/Overlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
leaveToClass: 'opacity-0 scale-[.98]'
}
}"
@show="$emit('show')"
@hide="$emit('hide')"
>
<div v-bind="contentProps">
<slot />
Expand All @@ -21,7 +23,7 @@
import OverlayPanel from 'primevue/overlaypanel';
import { HTMLAttributes, ref } from 'vue';
const overlay = ref();
const overlay = ref<InstanceType<typeof OverlayPanel>>();
withDefaults(
defineProps<{
Expand All @@ -32,8 +34,15 @@ withDefaults(
}
);
defineEmits<{
(e: 'hide'): void; // eslint-disable-line no-unused-vars
(e: 'show'): void; // eslint-disable-line no-unused-vars
}>();
defineExpose({
toggle: (e: Event) => overlay.value.toggle(e)
hide: () => overlay.value?.hide(),
show: (e: Event) => overlay.value?.show(e),
toggle: (e: Event) => overlay.value?.toggle(e)
});
</script>

Expand Down

0 comments on commit 048a990

Please sign in to comment.