# nails-courses-card

> Component for npm registry

Latest version **0.0.8** (published 2020-10-05) · 0 weekly downloads

## Install

```sh
npm install nails-courses-card
pnpm add nails-courses-card
yarn add nails-courses-card
bun add nails-courses-card
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2020-10-05 |
| First published | 2020-10-03 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 2.6 MB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| Author | vue-command |
| Maintainers | systanon |

## Links

- npm: https://www.npmjs.com/package/nails-courses-card
- npm.io page: https://npm.io/package/nails-courses-card

## Dependencies (4)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [core-js](https://npm.io/package/core-js.md) ^3.6.5
- [vuetify](https://npm.io/package/vuetify.md) ^2.2.11
- [nails-styles](https://npm.io/package/nails-styles.md) ^0.0.3

## Recent versions

- 0.0.8 (latest) — 2020-10-05
- 0.0.7 — 2020-10-03
- 0.0.6 — 2020-10-03
- 0.0.5 — 2020-10-03
- 0.0.4 — 2020-10-03
- 0.0.3 — 2020-10-03
- 0.0.2 — 2020-10-03
- 0.0.1 — 2020-10-03

## README

## install component
```
yarn add nails-courses-card
```

### Load the component and it's styles

App.vue
```
import 'nails-courses-card'
import 'nails-courses-card/dist/dgtek-app-header.css'
```

### Use the component

```
 <CourseCard
  :accessDays="accessDays"
  :url="url"
  :name="nameOfCourse"
  :subtitle="subtitle"
  :price="price"
  :id="id"
  :removeCourse="deleteRequest"
  :editCourse="editCourse"
  :type="typeCourse"
/>
```

### Example

###### App.vue
```
<template>
  <v-card dark class="ma-16" width="350">
    <v-img :src="imageUrl" @error="onError" height="200px" />
    <v-card-title class="buttons--text pa-0 pl-4 pt-4">
      {{ accessDays }} days | $ {{ price }}
    </v-card-title>
    <v-card-title class="pa-0 pl-4">
      {{ name }}
    </v-card-title>
    <v-card-text class="pa-0 px-4 pb-4 text-start">
      {{ subtitle }}
    </v-card-text>
    <v-card-actions v-if="type === 'online'" class="pl-4 pb-4">
      <v-btn
        color="buttons"
        rounded
        small
        outlined
        primary
        min-width="90"
        class="yellow-button mr-4"
        >pay</v-btn
      >
      <v-btn
        color="buttons"
        rounded
        small
        min-width="90"
        dark
        class="yellow-button"
        >more</v-btn
      >
    </v-card-actions>
    <v-card-actions v-else-if="type === 'offline'" class="pl-4 pb-4">
      <v-btn
        color="buttons"
        rounded
        outlined
        small
        dark
        min-width="90"
        class="yellow-button"
        >more</v-btn
      >
    </v-card-actions>
    <v-card-actions v-else class="pl-4 pb-4">
      <v-btn
        color="buttons"
        rounded
        small
        outlined
        primary
        min-width="90"
        class="yellow-button mr-4"
        @click="editCourse(id)"
        >Edit</v-btn
      >
      <v-btn
        color="buttons"
        rounded
        small
        min-width="90"
        dark
        class="yellow-button"
        @click="removeCourse(id)"
        >Delete</v-btn
      >
    </v-card-actions>
  </v-card>
</template>

<style scoped>
</style>

<script>
import {
  VCard, VBtn, VImg, VCardTitle, VCardText,
  VCardActions
} from 'vuetify/lib'

export default {
  name: 'course-card',
  props: [
    'url',
    'name',
    'price',
    'id',
    'type',
    'subtitle',
    'accessDays',
    'removeCourse',
    'editCourse'
  ],
  components: {
    VCard,
    VBtn,
    VImg,
    VCardTitle,
    VCardText,
    VCardActions
  },
  data: () => ({
    coverImageSrc: require('../assets/noImage.jpg'),
    imageUrl: null
  }),
  watch: {
    url (val) {
      this.checkUrl(val)
    }
  },
  methods: {
    onError () {
      this.imageUrl = this.coverImageSrc
    },
    checkUrl (url) {
      this.imageUrl = url || this.coverImageSrc
    }
  },
  created () {
    this.checkUrl(this.url)
  }
}
</script>
```

---
_Source: https://npm.io/package/nails-courses-card · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
