Skip to content

koory1st/svelte-element-ui

Repository files navigation

npm-publish

What is svelte-element-ui?

svelte-element-ui is a element-ui component library base on Svelte.

Documentation

Install

  1. Install from npm.
npm install svelte-element-ui
  1. import the css in svelte file.
<script lang="ts">
  import 'svelte-element-ui/dist/style.css'
  import { SeuAside, SeuButton } from 'svelte-element-ui'
</script>

<SeuAside />
<SeuButton>123</SeuButton>

To enable the style effective, rollup-plugin-css-only is needed to add in the rollup.config.js as a plugin.

import css from 'rollup-plugin-css-only';

export default {
  ...
  plugins: [
    ...
      css({ output: 'bundle.css' }),
    ...
  ]
  ...
}

Example

Edit the file src/App.svelte, and import the component in examples path like this.

<script lang="ts">
  import Menu from '../examples/menu/App.svelte'
</script>

<Menu />

then, execute the dev command.

npm run dev

Development

Running Tests

npm run test

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published