@paperclip-ui/autocomplete
v18.5.6
Published
Internal Autocomplete helper util for language clients
Downloads
429
Readme
Internal autocomplete library for Paperclip
Demo:
import { getSuggestions } from "@paperclip-ui/complete";
let source = `<style> .element { col`;
const suggestions = getSuggestions(source, {
mixins: [["typography", "big-font"]],
components: [["internal-component"]],
classNames: [["typography", "my-imported-class"]]
}); // [{ sub: 3, value: "color" }]
const suggestion = suggestions[0];
source = source.substr(0, source.length - suggestion.length) + suggestion.value;