diff --git a/src/Dot/Dot.stories.js b/src/Dot/Dot.stories.js new file mode 100644 index 0000000..1b828d0 --- /dev/null +++ b/src/Dot/Dot.stories.js @@ -0,0 +1,13 @@ +import DotView from './DotView.svelte'; + +export default { + title: 'Dot', + component: DotView +}; + +const Template = ({ ...args }) => ({ + Component: DotView, + props: args +}); + +export const Primary = Template.bind({}); diff --git a/src/Dot/Dot.svelte b/src/Dot/Dot.svelte new file mode 100644 index 0000000..edb2f48 --- /dev/null +++ b/src/Dot/Dot.svelte @@ -0,0 +1,54 @@ + + +
+
+
+ + \ No newline at end of file diff --git a/src/Dot/DotView.svelte b/src/Dot/DotView.svelte new file mode 100644 index 0000000..100ea7a --- /dev/null +++ b/src/Dot/DotView.svelte @@ -0,0 +1,17 @@ + + + diff --git a/src/stories/Dots.stories.js b/src/Dots/Dots.stories.js similarity index 100% rename from src/stories/Dots.stories.js rename to src/Dots/Dots.stories.js diff --git a/src/Dots.svelte b/src/Dots/Dots.svelte similarity index 61% rename from src/Dots.svelte rename to src/Dots/Dots.svelte index c3993a1..394c75a 100644 --- a/src/Dots.svelte +++ b/src/Dots/Dots.svelte @@ -1,5 +1,7 @@
- {#each Array(pagesCount) as _, pageIndex} + {#each Array(pagesCount) as _, pageIndex (pageIndex)}
-
handleDotClick(pageIndex)} - >
+ >
{/each}
@@ -44,22 +45,4 @@ align-items: center; justify-content: center; } - .dot { - height: var(--dot-size); - width: var(--dot-size); - background-color: #aaa; - border-radius: 50%; - display: inline-block; - opacity: 0.5; - margin: 3px; - cursor: pointer; - } - .dot:hover { - opacity: 0.9; - } - .current { - height: calc(var(--dot-size) + 3px); - width: calc(var(--dot-size) + 3px); - opacity: 0.7; - } \ No newline at end of file diff --git a/src/stories/DotsView.svelte b/src/Dots/DotsView.svelte similarity index 90% rename from src/stories/DotsView.svelte rename to src/Dots/DotsView.svelte index 86f88e9..dd8cd7c 100644 --- a/src/stories/DotsView.svelte +++ b/src/Dots/DotsView.svelte @@ -1,5 +1,5 @@