1.0.1 • Published 4 years ago

svelteworld v1.0.1

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
4 years ago

Svelteworld

About:

Svelteworld is a Svelte component that contains the list of countries in accordance with the ISO 3155-1 standard. This list cointains 249 countries - independent nations, unrecognized countries and plain territories. The motivation behind the creation of this component is general lack of complete lists of countries of the World which complicates the development process. Also, please leave politics aside, because this is made in accordance with the aforementioned standard.

Installation:

Use the NPM package manager to install Svelteworld. After the installation, import the component:

import Svelteworld from "svelteworld";

And use the component like any other component in Svelte:

<Svelteworld/>

Props:

Svelteworld contains a <div> that is wrapped around the <select> which contains the <option> list of 249 countries. Props are variables of the String value (though set as undefined by default) meant for styling of the component:

PropsExplanation
divClassclass of the <div> which is wrapped around the <select> element
divIdthe id of the <div> which is wrapped around the <select> element
selectClassclass of the <select> element
selectIdthe id of of the <select> element
optionColortext color of the <option> element
selectBackgroundbackground color of the <select> element
selectWidthwidth of the <select> element
selectHeightheight of the <select> element
selectPaddingpadding of the <select> element
selectMarginmargin of the <select> element
selectBorderRadiusborder radius of the <select> element
selectFontSizefont-size of the <option> element

For example, if you want to set the color of options inside the <select>:

<Svelteworld optionColor = 'blue'/>

Or, if you want to set the border radius of the <select> you should do as follows:

<Svelteworld selectBorderRadius = '10px'/>

Contact:

stefan@cipher.global

1.0.1

4 years ago

1.0.0

4 years ago