refactor: update examples
This commit is contained in:
+19
-26
@@ -6,21 +6,14 @@
|
||||
<strong>Vue Brands</strong>
|
||||
</CCardHeader>
|
||||
<CCardBody>
|
||||
<!-- TODO: icons, brands and flags href-s to documentation -->
|
||||
<Example href="">
|
||||
<CRow class="text-center">
|
||||
<template v-for="(brand, brandName) in brands" :key="brandName">
|
||||
<CCol
|
||||
class="mb-5"
|
||||
col="3"
|
||||
sm="2"
|
||||
>
|
||||
<CIcon size="lg" :content="brand"/>
|
||||
<div>{{toKebabCase(brandName)}}</div>
|
||||
</CCol>
|
||||
</template>
|
||||
</CRow>
|
||||
</Example>
|
||||
<CRow class="text-center">
|
||||
<template v-for="(brand, brandName) in brands" :key="brandName">
|
||||
<CCol class="mb-5" col="3" sm="2">
|
||||
<CIcon size="lg" :content="brand" />
|
||||
<div>{{ toKebabCase(brandName) }}</div>
|
||||
</CCol>
|
||||
</template>
|
||||
</CRow>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
@@ -30,16 +23,16 @@
|
||||
<script>
|
||||
import { brandSet as brands } from '@coreui/icons'
|
||||
export default {
|
||||
name: "Brands",
|
||||
data: function(){
|
||||
return {
|
||||
brands: brands
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toKebabCase (str) {
|
||||
return str.replace(/([a-z])([A-Z0-9])/g, '$1-$2').toLowerCase()
|
||||
name: 'Brands',
|
||||
data: function () {
|
||||
return {
|
||||
brands: brands,
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
methods: {
|
||||
toKebabCase(str) {
|
||||
return str.replace(/([a-z])([A-Z0-9])/g, '$1-$2').toLowerCase()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user