Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
kewcoder committed Nov 14, 2023
1 parent 6cad592 commit 377057b
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 43 deletions.
20 changes: 9 additions & 11 deletions packages/@orchidui-vue/src/DataDisplay/Table/OcTableCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const props = defineProps({
},
},
datetime: String,
imageClass: String
imageClass: String,
});
const emit = defineEmits({
selected: [],
Expand Down Expand Up @@ -116,14 +116,8 @@ const copyToClipboard = async (text) => {

<!-- IMAGE -->
<template v-else-if="variant === Variants.IMAGE">
<div
v-if="data"
class="h-[42px] min-w-[42px] rounded mx-auto">
<img
:class="imageClass"
alt="table-img"
:src="data"
/>
<div v-if="data" class="h-[42px] min-w-[42px] rounded mx-auto">
<img :class="imageClass" alt="table-img" :src="data" />
</div>
<div
v-else
Expand All @@ -148,8 +142,12 @@ const copyToClipboard = async (text) => {
v-bind="content"
/>
<!-- CHIP -->
<Chip v-else-if="variant === Variants.CHIP" :label="data" :variant="chipOptions[data]"/>

<Chip
v-else-if="variant === Variants.CHIP"
:label="data"
:variant="chipOptions[data]"
/>

<!-- DEFAULT -->
<div v-else-if="data" class="flex items-center w-full">{{ data }}</div>
<div v-else>-</div>
Expand Down
47 changes: 22 additions & 25 deletions packages/@orchidui-vue/src/Form/DatePicker/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,45 +86,42 @@ const updateCalendar = () => {
<div class="flex flex-col gap-y-2">
<div v-if="type === 'default'" class="flex w-full">
<Input
:model-value="formattedDate"
icon="calendar"
:label="label"
:hint="hint"
:placeholder="placeholder"
:disabled="disabled"
readonly
:has-error="errorMessage.length > 0"
:model-value="formattedDate"
icon="calendar"
:label="label"
:hint="hint"
:placeholder="placeholder"
:disabled="disabled"
readonly
:has-error="errorMessage.length > 0"
/>
</div>
<div v-else class="flex gap-x-4">
<Input
label="From"
:model-value="formattedDate[0]"
icon="calendar"
:placeholder="placeholder"
:disabled="disabled"
readonly
:has-error="errorMessage.length > 0"
label="From"
:model-value="formattedDate[0]"
icon="calendar"
:placeholder="placeholder"
:disabled="disabled"
readonly
:has-error="errorMessage.length > 0"
/>
<Input
label="To"
:model-value="formattedDate[1]"
icon="calendar"
:placeholder="placeholder"
:disabled="disabled"
readonly
:has-error="errorMessage.length > 0"
label="To"
:model-value="formattedDate[1]"
icon="calendar"
:placeholder="placeholder"
:disabled="disabled"
readonly
:has-error="errorMessage.length > 0"
/>
</div>
<div v-if="errorMessage" class="text-sm text-oc-error flex items-center">
{{ errorMessage }}
</div>
</div>
<template #menu>
<Calendar
v-if="!disabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const Default = {
args: {
type: "range",
dateFormat: "DD/MM/YYYY",
errorMessage: ''
errorMessage: "",
},
render: (args) => ({
components: { Theme, DatePicker },
Expand Down
4 changes: 2 additions & 2 deletions packages/@orchidui-vue/src/Form/Input/OcInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const props = defineProps({
},
hasError: {
type: Boolean,
default: false
}
default: false,
},
});
defineEmits({
Expand Down
2 changes: 1 addition & 1 deletion packages/@orchidui-vue/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default defineConfig({
"dayjs",
"v-calendar",
"@vueup/vue-quill",
"vue-advanced-cropper"
"vue-advanced-cropper",
],
},
},
Expand Down
5 changes: 2 additions & 3 deletions src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
@tailwind base;
@layer base {
body {
-moz-osx-font-smoothing: grayscale;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-family: 'Inter', sans-serif;
font-family: "Inter", sans-serif;
color: var(--oc-text-500);
background-color: var(--oc-background-light);
@apply text-base;
Expand Down Expand Up @@ -39,4 +39,3 @@

@tailwind components;
@tailwind utilities;

0 comments on commit 377057b

Please sign in to comment.