Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): sidebar: beta badge #1272

Merged
merged 3 commits into from
Jun 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: add a tooltip explaining what beta is
  • Loading branch information
ssiyad committed Jun 19, 2023
commit a722f9e31898c65048ff05a10b446206b468ac1d
7 changes: 5 additions & 2 deletions desk/src/components/desk/sidebar/SidebarLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@
}"
>
{{ label }}
<Badge v-if="isBeta" theme="orange" variant="subtle">beta</Badge>
<Tooltip :text="betaText">
<Badge v-if="isBeta" theme="orange" variant="subtle">beta</Badge>
</Tooltip>
</div>
</div>
</template>

<script setup lang="ts">
import { computed } from "vue";
import { Badge } from "frappe-ui";
import { useRoute, useRouter } from "vue-router";
import { Badge, Tooltip } from "frappe-ui";
import { useSidebarStore } from "@/stores/sidebar";

const props = defineProps({
Expand Down Expand Up @@ -61,6 +63,7 @@ const route = useRoute();
const router = useRouter();
const sidebarStore = useSidebarStore();
const isActive = computed(() => props.to.includes(route.name.toString()));
const betaText = "This feature is a work in progress. Use with caution";

function handle() {
props.onClick();
Expand Down