Skip to content

Commit

Permalink
fix: add StatusMessage to exports
Browse files Browse the repository at this point in the history
  • Loading branch information
danielstorey committed Aug 16, 2024
1 parent 9d280d5 commit 03f0a53
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
Input with formElement - label
</div>
<CTextInput label="Test Label" />
<StatusMessage status=""
</div>

<div>
Expand Down
14 changes: 6 additions & 8 deletions src/components/Status/StatusMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@
</div>
</template>

<script setup>
<script setup lang="ts">
type Status = 'error' | 'warning' | 'info' | 'success';
import STATUSES from './statuses'
import StatusIndicator from './StatusIndicator.vue';
const props = defineProps({
status: {
type: String,
default: STATUSES.NO_STATUS,
validator: (val) => Object.values(STATUSES).includes(val),
},
const props = defineProps<{
status: Status,
text: String,
});
}>();
const borderClassMap = {
[STATUSES.INFO]: 'border-blue-500',
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import CModal from './components/Modal/Modal.vue';
import CPopupMenu from './components/PopupMenu/PopupMenu.vue'
import CAccordion from './components/Accordion/Accordion.vue';
import CStatusBar from './components/Status/StatusBar.vue';
import CStatusMessage from './components/Status/StatusMessage.vue';
import { CTabs, CTabPanel, CTabLabel } from './components/Tabs';
import { CToolbar, CToolGroup, CTool } from './components/Toolbar';
import { CViewportContainer, CViewport } from './components/Viewport';
Expand Down Expand Up @@ -81,6 +82,7 @@ const allComponents = {
CSelectFileTypeItem,
CStatusBar,
CStatusIndicator,
CStatusMessage,
CPopupMenu,
CEditableDiv,
};
Expand Down

0 comments on commit 03f0a53

Please sign in to comment.