0.0.18 • Published 1 year ago

mindlens-components v0.0.18

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Vue 3 custom components

Custom component and plugins build for Vue 3

What's included ?

  1. Button
  2. Alert

How to install ?

  1. Start a new project
  2. Run 'npm intall mindlens-components' or 'yarn add mindlens-components' in terminal at root dir

How to use the plugins and components ?

  1. Open main.ts
  2. Insert code below to register the plugins and components
import mindlens from 'mindlens-components'
import 'mindlens-components/styles.css'

import App from './App.vue'

createApp(App)
.use(mindlens)
.mount('#app')
  1. To use the button, use component:
<ml-button variation="left-icon-text"/>
<ml-button variation="text-only"/>

<ml-button type="secondary" variation="right-icon-text"/>
<ml-button type="secondary" variation="icon-only"/>
  1. To use the alert, use MLAlert plugin. Need to inject the plugin into the component as below:
export default {
    inject: ['MLAlert'],
    data() {
      return {
        mlAlert: this.MLAlert
      }
    },
    methods: {
      showAlert(type: string, variation: string){
        this.mlAlert({
            header: 'This is header',
            type: type,
            variation: variation,
            content: 'This is a content. Content is a subject or ideas contained in something written, said...
            textButton1: "Btn 1",
            textButton2: "Btn 2"
        })
      },
    }
}

props

  1. Button component:
PropsDescriptionValue
variationvVriation of the buttonleft-icon-text, right-icon-text, text-only, icon-only
typeButton style typeprimary, secondary
type2Button criticality style typeinfo(default), warning, error, success
textButton text contentString value
  1. Alert plugin
PropsDescriptionValue
variationVariation of the alertall, title-only, content-only, title-content
typeAlert criticality style typeinfo, error, warning, success
headerAlert header contentString value
contentAlert description contentString value
textButton1Button 1 text contentString value
textButton2Button 2 text contentString value

Example

For live example can go here

0.0.18

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago