Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

[Feature request] Expose visible computed property from useKBarStateΒ #3

@MCYouks

Description

@MCYouks

Hi there,

Thank you very much for your amazing work. I have a request to simplify the usage of useKBarState.

If we want to open the KBar manually, we have to create computed and methods.

It would be great to be provided with a set of computed and methods out of the box.

Current situation

const state = useKBarState();
const visible = computed(() => state.value.visibility !== "hidden");
const open = () => { state.value.visibility = "visible" }
const close = () => { state.value.visibility = "hidden" }

return { visible, open, close }

Ideally

const { visible, open, close } = useKBarState();

return { visible, open, close }

What do you think πŸ€”

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions