Skip to content

Commit

Permalink
#105 Add no rows overlay component
Browse files Browse the repository at this point in the history
  • Loading branch information
wouter-adriaens committed Jan 11, 2024
1 parent 48af99b commit 88a0ab0
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/dumb/NoRowsOverlay.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<div class="ag-overlay-loading-center">
<font-awesome-icon :icon="['fas', 'circle-exclamation']" />
{{ props.params.noRowsMessage }}
</div>
</template>

<script setup lang="ts">
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
const props = defineProps<{ params: { noRowsMessage: string } }>();
</script>
21 changes: 21 additions & 0 deletions src/stories/dumb-components/no-rows-overlay.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import NoRowsOverlay from '@components/dumb/NoRowsOverlay.vue';
import type { Meta, StoryObj } from '@storybook/vue3';

const meta: Meta<typeof NoRowsOverlay> = {
title: 'Dumb components/NoRowsOverlay',
component: NoRowsOverlay,
tags: ['autodocs'],
argTypes: {
params: { control: 'object' },
},
args: {
params: {
noRowsMessage: 'No rows available',
},
},
};

export default meta;
type Story = StoryObj<typeof NoRowsOverlay>;

export const Default: Story = {};

0 comments on commit 88a0ab0

Please sign in to comment.