0.0.0-alpha.1 • Published 8 months ago

vhoc v0.0.0-alpha.1

Weekly downloads
-
License
-
Repository
github
Last release
8 months ago

Documentation: https://penjj.github.io/vhoc/

Playground: https://stackblitz.com/edit/vitejs-vite-jqkxzj?file=src/App.vue

Install

pnpm i vhoc -S

Usage

import { withProps } from 'vhoc'

const MyInput = withProps(Input)({
  placeholder: 'Please enter.'
})

<MyInput /> // <Input placeholder="Please enter." />
<MyInput placeholder="Hello world." /> // <Input placeholder="Hello world." />

With unplugin-auto-import

// vite.config.js
import { VhocImports } from 'vhoc/imports'

export default defineConfig({
  plugins: [
    AutoImport({
      imports: [
        VhocImports()
      ]
    })
  ]
})