refactor: removed timeline button

This commit is contained in:
victor
2022-12-18 14:56:00 +04:00
parent e3fb92cb56
commit 7b42dbc0f6
7 changed files with 10 additions and 32 deletions

View File

@@ -11,7 +11,7 @@ import TimelineHorizontalExample from './timeline/examples/TimelineHorizontalExa
```vue ```vue
<script setup> <script setup>
import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle, TimelineButton } from 'flowbite-vue' import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle } from 'flowbite-vue'
</script> </script>
<template> <template>
<Timeline> <Timeline>
@@ -28,9 +28,6 @@ import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, T
<timeline-body> <timeline-body>
Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages. Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages.
</timeline-body> </timeline-body>
<timeline-button>
Learn more <svg class="ml-2 w-3 h-3" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
</timeline-button>
</timeline-content> </timeline-content>
</timeline-item> </timeline-item>
<timeline-item> <timeline-item>
@@ -75,7 +72,7 @@ You can add icons by passing svg icons as slot to `<timeline-point></timeline-po
```vue ```vue
<script setup> <script setup>
import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle, TimelineButton } from 'flowbite-vue' import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle } from 'flowbite-vue'
</script> </script>
<template> <template>
<Timeline> <Timeline>
@@ -93,9 +90,6 @@ import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, T
<timeline-body> <timeline-body>
Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages. Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages.
</timeline-body> </timeline-body>
<timeline-button>
Learn more <svg class="ml-2 w-3 h-3" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
</timeline-button>
</timeline-content> </timeline-content>
</timeline-item> </timeline-item>
<timeline-item> <timeline-item>
@@ -142,7 +136,7 @@ import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, T
```vue ```vue
<script setup> <script setup>
import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle, TimelineButton } from 'flowbite-vue' import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle } from 'flowbite-vue'
</script> </script>
<template> <template>
<Timeline> <Timeline>
@@ -160,9 +154,6 @@ import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, T
<timeline-body> <timeline-body>
Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages. Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages.
</timeline-body> </timeline-body>
<timeline-button>
Learn more <svg class="ml-2 w-3 h-3" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
</timeline-button>
</timeline-content> </timeline-content>
</timeline-item> </timeline-item>
<timeline-item> <timeline-item>

View File

@@ -13,9 +13,6 @@
<timeline-body> <timeline-body>
Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages. Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages.
</timeline-body> </timeline-body>
<timeline-button>
Learn more <svg class="ml-2 w-3 h-3" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
</timeline-button>
</timeline-content> </timeline-content>
</timeline-item> </timeline-item>
<timeline-item> <timeline-item>
@@ -51,5 +48,5 @@
</Timeline> </Timeline>
</template> </template>
<script setup> <script setup>
import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle, TimelineButton, TimelineBody } from '../../../../src/index' import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle, TimelineBody } from '../../../../src/index'
</script> </script>

View File

@@ -14,9 +14,6 @@
<timeline-body> <timeline-body>
Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages. Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages.
</timeline-body> </timeline-body>
<timeline-button>
Learn more <svg class="ml-2 w-3 h-3" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
</timeline-button>
</timeline-content> </timeline-content>
</timeline-item> </timeline-item>
<timeline-item> <timeline-item>
@@ -54,5 +51,5 @@
</Timeline> </Timeline>
</template> </template>
<script setup> <script setup>
import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle, TimelineButton, TimelineBody } from '../../../../src/index' import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle, TimelineBody } from '../../../../src/index'
</script> </script>

View File

@@ -14,9 +14,6 @@
<timeline-body> <timeline-body>
Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages. Get access to over 20+ pages including a dashboard layout, charts, kanban board, calendar, and pre-order E-commerce & Marketing pages.
</timeline-body> </timeline-body>
<timeline-button>
Learn more <svg class="ml-2 w-3 h-3" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
</timeline-button>
</timeline-content> </timeline-content>
</timeline-item> </timeline-item>
<timeline-item> <timeline-item>
@@ -54,5 +51,5 @@
</Timeline> </Timeline>
</template> </template>
<script setup> <script setup>
import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle, TimelineButton, TimelineBody } from '../../../../src/index' import { Timeline, TimelineItem, TimelinePoint, TimelineTime, TimelineContent, TimelineTitle, TimelineBody } from '../../../../src/index'
</script> </script>

View File

@@ -1,13 +1,13 @@
<template> <template>
<div> <div>
<ol :class="classNames(defaultClasses, horizontal ? horizontalClasses : verticalClasses)" v-bind="$attrs"> <ol :class="timelineClasses" v-bind="$attrs">
<slot></slot> <slot></slot>
</ol> </ol>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import classNames from 'classnames' import classNames from 'classnames'
import { provide } from 'vue' import { computed, provide } from 'vue'
const props = defineProps({ const props = defineProps({
horizontal: { horizontal: {
@@ -21,4 +21,6 @@ provide('horizontal', props.horizontal)
const defaultClasses = 'relative border-gray-200 dark:border-gray-700' const defaultClasses = 'relative border-gray-200 dark:border-gray-700'
const verticalClasses = 'border-l' const verticalClasses = 'border-l'
const horizontalClasses = 'flex' const horizontalClasses = 'flex'
const timelineClasses = computed(() => classNames(defaultClasses, props.horizontal ? horizontalClasses : verticalClasses))
</script> </script>

View File

@@ -1,5 +0,0 @@
<template>
<a href="#" class="inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:outline-none focus:ring-gray-200 focus:text-blue-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-gray-700">
<slot></slot>
</a>
</template>

View File

@@ -39,7 +39,6 @@ export { default as TimelineContent } from './components/Timeline/TimelineConten
export { default as TimelineTime } from './components/Timeline/TimelineTime.vue' export { default as TimelineTime } from './components/Timeline/TimelineTime.vue'
export { default as TimelineTitle } from './components/Timeline/TimelineTitle.vue' export { default as TimelineTitle } from './components/Timeline/TimelineTitle.vue'
export { default as TimelineBody } from './components/Timeline/TimelineBody.vue' export { default as TimelineBody } from './components/Timeline/TimelineBody.vue'
export { default as TimelineButton } from './components/Timeline/TimelineButton.vue'
export { default as Toast } from './components/Toast/Toast.vue' export { default as Toast } from './components/Toast/Toast.vue'
export { default as ToastProvider } from './components/Toast/components/ToastProvider/ToastProvider.vue' export { default as ToastProvider } from './components/Toast/components/ToastProvider/ToastProvider.vue'
export { default as Tooltip } from './components/Tooltip/Tooltip.vue' export { default as Tooltip } from './components/Tooltip/Tooltip.vue'