diff --git a/src/components/EventDetail/EventTokenItem.vue b/src/components/EventDetail/EventTokenItem.vue new file mode 100644 index 0000000..4c63633 --- /dev/null +++ b/src/components/EventDetail/EventTokenItem.vue @@ -0,0 +1,106 @@ + + + + + diff --git a/src/components/EventDetail/EventTokenNew.vue b/src/components/EventDetail/EventTokenNew.vue new file mode 100644 index 0000000..ffce44b --- /dev/null +++ b/src/components/EventDetail/EventTokenNew.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/components/EventDetail/EventTokens.vue b/src/components/EventDetail/EventTokens.vue new file mode 100644 index 0000000..c98ed58 --- /dev/null +++ b/src/components/EventDetail/EventTokens.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/components/UI/BaseButton.vue b/src/components/UI/BaseButton.vue index dac64b9..76cda20 100644 --- a/src/components/UI/BaseButton.vue +++ b/src/components/UI/BaseButton.vue @@ -1,5 +1,5 @@ + + + + diff --git a/src/components/UI/BaseInput.vue b/src/components/UI/BaseInput.vue index 228ed5e..d02c920 100644 --- a/src/components/UI/BaseInput.vue +++ b/src/components/UI/BaseInput.vue @@ -33,5 +33,13 @@ const value = computed({ border-radius: 0.25rem; height: 2.5rem; font-size: 0.875rem; + border: 1px solid $color-secondary; + + &::placeholder { + color: $text-secondary; + } + &:focus { + border-color: black; + } } diff --git a/src/components/UI/DateChip.vue b/src/components/UI/DateChip.vue index 18b2dff..01b5376 100644 --- a/src/components/UI/DateChip.vue +++ b/src/components/UI/DateChip.vue @@ -1,6 +1,6 @@ + + + + diff --git a/src/composables/useMenuModal.ts b/src/composables/useMenuModal.ts new file mode 100644 index 0000000..74375ec --- /dev/null +++ b/src/composables/useMenuModal.ts @@ -0,0 +1,25 @@ +import { ref, onMounted, onUnmounted } from 'vue' + +export const useMenuModal = () => { + const isMenuModalOpen = ref(false) + const toggleMenuModal = () => { + isMenuModalOpen.value = !isMenuModalOpen.value + } + + const itemButtonRef = ref() + const handleClick = (e: MouseEvent) => { + if (!itemButtonRef.value) return + if (!itemButtonRef.value.contains(e.target as Node)) { + isMenuModalOpen.value = false + } + } + + onMounted(() => { + document.addEventListener('click', handleClick) + }) + onUnmounted(() => { + document.removeEventListener('click', handleClick) + }) + + return [isMenuModalOpen, toggleMenuModal, itemButtonRef] as const +} diff --git a/src/lib/parsePathParams.ts b/src/lib/parsePathParams.ts new file mode 100644 index 0000000..e99f1f2 --- /dev/null +++ b/src/lib/parsePathParams.ts @@ -0,0 +1,6 @@ +export const getMeetingId = (v: string | string[]) => { + if (Array.isArray(v)) { + v = v[0] + } + return v +} diff --git a/src/styles/common.scss b/src/styles/common.scss index 35a0162..339bc7a 100644 --- a/src/styles/common.scss +++ b/src/styles/common.scss @@ -5,3 +5,4 @@ $background-primary: #f6f6f6; $background-secondary: #dfdede; $text-primary: #141414; +$text-secondary: #bbbbbb; diff --git a/src/utils/dateFormat.ts b/src/utils/date.ts similarity index 82% rename from src/utils/dateFormat.ts rename to src/utils/date.ts index 2e2704f..d3d4428 100644 --- a/src/utils/dateFormat.ts +++ b/src/utils/date.ts @@ -11,3 +11,7 @@ export function getDateDiffText(date: Date): string { return `${nowDate.diff(pastDate, 'day')}日前` return `${nowDate.diff(pastDate, 'hour')}時間前` } + +export const formatDate = (date: Date): string => { + return dayjs(date).format('YYYY/MM/DD') +}