0.3.0 • Published 9 months ago

@dzangolab/vue-country-flag-icon v0.3.0

Weekly downloads
80
License
MIT
Repository
github
Last release
9 months ago

@dzangolab/vue-country-flag-icon

Country flag component for Vue. Supports SSR apps.

Requirements

  • vue.js >= 3.0

Usage

Add the package to your app via npm:

npm install @dzangolab/vue-country-flag-icon --save

or yarn:

yarn add @dzangolab/vue-country-flag-icon

Add CountryFlag globally

# main.js

import CountryFlag from '@dzangolab/vue-country-flag-icon'
import '@dzangolab/vue-country-flag-icon/dist/CountryFlag.css' // import stylesheet

app.use('CountryFlag', CountryFlag)

Add CountryFlag inside a component

# MyComponent.vue
<template>
  <CountryFlag iso="GB" mode="squared" />
  <CountryFlag iso="GB" mode="rounded" />
</template>

<script>
  import CountryFlag from '@dzangolab/vue-country-flag-icon'
  import '@dzangolab/vue-country-flag-icon/dist/CountryFlag.css' // import stylesheet

  export default {
    components: {
      CountryFlag
    }
  }
</script>

Props

iso

country ISO code (alpha-2 code).

This setting is required.

title

title for the country flag.

mode

Determines the behavior of the country flag. This component support 2 modes rounded and squared.

This setting is required.

SCSS

Instead of importing the css file in component or main.js, you can also import scss file into your app scss file.

@import '~@dzangolab/vue-country-flag-icon/src/assets/scss/country-flag.scss';
0.3.0

9 months ago

0.2.0

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago