Comments (5)
Actually it was a doc glitch ...
The demo code from https://c0bra.github.io/svelma/components/dialog - first example uses Toast too:
import { Button, Dialog } from 'svelma'
...
const thenHandler = result =>Toast.create(`You ${result ? 'confirmed' : 'canceled'}`)
etc
So, the import line for the first example should read
import { Button, Dialog, Toast } from 'svelma'
Otherwise, it generates errors.
Silly me - I could have noticed beforehand ... sry
Could you please fix the doc?
from svelma.
Either of these ways should work
import { Button } from 'svelma/src/index.js';
import Button from 'svelma/src/components/Button.svelte';
Also see pull request #31 which should allow you to just import components directly when its merged
from svelma.
Thanks for the reply.
The Button line works OK. I already had tried it.
The problem is with the Dialog line.
I tried to replace
import { Button, Dialog } from 'svelma';
with
import Button from 'svelma/src/components/Button.svelte';
import Dialog from 'svelma/src/components/Dialog';
but the Dialog
line is problematic. Even if I put
import Dialog from 'svelma/src/components/Dialog/Dialog.svelte';
I still get errors.
from svelma.
import Dialog from 'svelma/src/components/Dialog';
and the demo code from the docs works for me on Svelma 0.3.0... I'm not using Sapper though...
What do the errors say?
from svelma.
Done, thanks for finding this!
from svelma.
Related Issues (20)
- We need this
- Allow binding activeTab property in Tabs HOT 2
- Collapse doesn't work properly HOT 2
- Removing or Updating Tabs dynamically does not work
- Dialogs don't work
- Quick Start doesn't work because of "Cannot find module" error HOT 3
- Add support for SvelteKit HOT 3
- Tabs bind:active doesn't work HOT 2
- RTL layout HOT 1
- Dialog Alert won't close due to: Uncaught (in promise) TypeError: resolve is not a function HOT 5
- Release !?
- Warning on building a SvelteKit application includign Svelma
- Error: PostCSS plugin postcss-noop-plugin requires PostCSS 8 HOT 2
- Following the installation guide for Rollup bundler, after installing the required npm packages, when postcss() is added to rollup.config.js the following error occurs. HOT 1
- codesandbox example isnt working HOT 2
- Feature request: dark mode
- Tooltips Dialog and Switch inherit bulma original variables, unable to override HOT 2
- Tooltip Animations too fast (86ms), allow user to adjust the speed, and if possible the type the animation too HOT 3
- Tooltip Animations not working HOT 1
- Progress value is not updated: Progress always stays indeterminate
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelma.