@empathyco/x-components
Version:
Empathy X Components
50 lines (47 loc) • 1.14 kB
JavaScript
import { defineComponent, computed } from 'vue';
/**
* The auto progress bar component is useful for displaying a visual indicator of numerical data
* in a bar shape.
*
* @public
*/
var _sfc_main = defineComponent({
name: 'AutoProgressBar',
props: {
/**
* A boolean flag indicating if the bar is loading.
*
* @public
*/
isLoading: {
type: Boolean,
default: true,
},
/**
* The duration in seconds of the progress bar.
*
* @public
*/
durationInSeconds: {
type: Number,
default: 5,
},
},
setup(props) {
/**
* Computed property to calculate the animation's duration.
*
* @returns The CSS styles of the animation.
*
* @internal
*/
const cssStyles = computed(() => ({
animationDuration: `${props.durationInSeconds}s`,
}));
return {
cssStyles,
};
},
});
export { _sfc_main as default };
//# sourceMappingURL=auto-progress-bar.vue2.js.map