svelte-element-ui
v1.3.29
Published
svelte-element-ui is a element-ui component library base on Svelte.
Downloads
10
Readme
What is svelte-element-ui?
svelte-element-ui is a element-ui component library base on Svelte.
Install
- Install from npm.
npm install svelte-element-ui
- 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