![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mcoil.corals.io/vendor/binarytorch/larecipe/resources/js/components/ |
<template> <component :is="tag" @click="handleClick" class="button" :class="classes"> <slot></slot> </component> </template> <script> export default { name: "larecipe-button", props: { tag: { type: String, default: "button", description: "Button tag (default -> button)" }, type: { type: String, default: "white", description: "Button type (e,g primary, danger etc)" }, textColor: { type: String, default: "", description: "Button text color (e.g primary, danger etc)" }, radius: { type: String, default: "md", description: "Border radius size" }, size: { type: String, default: "base", description: "Border radius size" }, block: { type: Boolean, default: false, description: "Whether button is of block type" } }, computed: { classes() { let btnClasses = [ { "w-full": this.block }, { [`text-${this.textColor}`]: this.textColor }, `is-${this.type}`, `rounded-${this.radius}`, `text-${this.size}`, ]; return btnClasses; } }, methods: { handleClick(evt) { this.$emit("click", evt); } } }; </script>