about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--components/Buttons/PlainButton.stories.js18
-rw-r--r--components/Buttons/PlainButton.vue30
-rw-r--r--components/JoinUs.vue15
3 files changed, 60 insertions, 3 deletions
diff --git a/components/Buttons/PlainButton.stories.js b/components/Buttons/PlainButton.stories.js
new file mode 100644
index 0000000..67a657d
--- /dev/null
+++ b/components/Buttons/PlainButton.stories.js
@@ -0,0 +1,18 @@
+import { storiesOf } from '@storybook/vue'
+import { center } from '../../.storybook/decorators'
+
+import PlainButton from './PlainButton'
+
+const plainButton = {
+  text: 'Plain Button'
+}
+
+storiesOf('PlainButton', module)
+  .addDecorator(center)
+  .add('default', () => {
+    return {
+      components: { PlainButton },
+      template: `<plain-button :text="text" />`,
+      data: () => plainButton
+    }
+  })
diff --git a/components/Buttons/PlainButton.vue b/components/Buttons/PlainButton.vue
new file mode 100644
index 0000000..6e0cde2
--- /dev/null
+++ b/components/Buttons/PlainButton.vue
@@ -0,0 +1,30 @@
+<template>
+  <button class="button" @click="$emit('click')">{{text}}</button>
+</template>
+
+<script>
+export default {
+  name: 'PlainButton',
+  props: {
+    text: {
+      type: String,
+      required: true
+    }
+  }
+}
+</script>
+
+<style scoped>
+.button {
+  background-color: #507b34;
+  padding: 10px;
+  max-width: 150px;
+  border: none;
+
+  cursor: pointer;
+
+  color: #ffffff;
+  text-align: center;
+  font: 16px 'Roboto Slab';
+}
+</style>
\ No newline at end of file
diff --git a/components/JoinUs.vue b/components/JoinUs.vue
index 6ffec91..d8bfadf 100644
--- a/components/JoinUs.vue
+++ b/components/JoinUs.vue
@@ -4,13 +4,22 @@
       <div class="title">
         <div class="text">Rozpocznij swoją harcerską przygodę!</div>
       </div>
-      <div class="button">
-        <nuxt-link to="/kontakt">Dołącz do nas!</nuxt-link>
-      </div>
+      <plain-button @click="$router.push('/kontakt')" text="Dołącz do nas" />
     </div>
   </section>
 </template>
 
+<script>
+import PlainButton from './Buttons/PlainButton'
+
+export default {
+  name: 'JoinUs',
+  components: {
+    PlainButton
+  }
+}
+</script>
+
 <style scoped>
 .joinus {
   width: 100%;