Skip to content

Commit

Permalink
fix: CDataTable - fix icons
Browse files Browse the repository at this point in the history
  • Loading branch information
woothu committed Nov 7, 2019
1 parent 885b010 commit 125fd5e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 89 deletions.
8 changes: 4 additions & 4 deletions src/components/table/CDataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
>
<CIcon
width="18"
name="arrowTop"
:content="$options.icons.arrowTop"
:class="iconClasses(index)"
/>
</slot>
Expand Down Expand Up @@ -144,7 +144,7 @@
<h2>{{ passedItems.length ? 'No filtering results ' : 'No items'}}
<CIcon
width="30"
name="ban"
:content="$options.icons.ban"
class="text-danger mb-2"
/>
</h2>
Expand Down Expand Up @@ -210,12 +210,12 @@
<script>
import CSpinner from '../spinner/CSpinner'
import CPagination from '../pagination/CPagination'
import { CIcon as CIconRaw } from '@coreui/icons-vue/index.js'
import { CIcon } from '@coreui/icons-vue/index.js'
import { arrowTop, ban } from '@coreui/icons'
const CIcon = Object.assign({}, CIconRaw, { icons : { arrowTop, ban }})
export default {
name: 'CDataTable',
icons: { arrowTop, ban },
components: {
CPagination,
CSpinner,
Expand Down
95 changes: 10 additions & 85 deletions src/components/table/tests/__snapshots__/CDataTable.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -575,25 +575,10 @@ exports[`CDataTable renders correctly 2`] = `
<svg
class="c-icon c-icon-custom-size icon-transition position-absolute arrow-position rotate-icon"
viewBox="0 0 24 24"
viewBox="0 0 64 64"
width="18"
xmlns="http://www.w3.org/2000/svg"
>
<title>
arrow-top
</title>
<path
d="M18.311 7.061l-6.311-6.311-6.31 6.311 1.061 1.061 4.5-4.5v19.593h1.5v-19.593l4.5 4.5 1.061-1.061z"
/>
</svg>
/>
</th>
<th
class="position-relative pr-4"
Expand All @@ -607,25 +592,10 @@ exports[`CDataTable renders correctly 2`] = `
<svg
class="c-icon c-icon-custom-size icon-transition position-absolute arrow-position transparent"
viewBox="0 0 24 24"
viewBox="0 0 64 64"
width="18"
xmlns="http://www.w3.org/2000/svg"
>
<title>
arrow-top
</title>
<path
d="M18.311 7.061l-6.311-6.311-6.31 6.311 1.061 1.061 4.5-4.5v19.593h1.5v-19.593l4.5 4.5 1.061-1.061z"
/>
</svg>
/>
</th>
<th
class="position-relative pr-4"
Expand All @@ -639,25 +609,10 @@ exports[`CDataTable renders correctly 2`] = `
<svg
class="c-icon c-icon-custom-size icon-transition position-absolute arrow-position transparent"
viewBox="0 0 24 24"
viewBox="0 0 64 64"
width="18"
xmlns="http://www.w3.org/2000/svg"
>
<title>
arrow-top
</title>
<path
d="M18.311 7.061l-6.311-6.311-6.31 6.311 1.061 1.061 4.5-4.5v19.593h1.5v-19.593l4.5 4.5 1.061-1.061z"
/>
</svg>
/>
</th>
<th
class="position-relative pr-4"
Expand All @@ -671,25 +626,10 @@ exports[`CDataTable renders correctly 2`] = `
<svg
class="c-icon c-icon-custom-size icon-transition position-absolute arrow-position transparent"
viewBox="0 0 24 24"
viewBox="0 0 64 64"
width="18"
xmlns="http://www.w3.org/2000/svg"
>
<title>
arrow-top
</title>
<path
d="M18.311 7.061l-6.311-6.311-6.31 6.311 1.061 1.061 4.5-4.5v19.593h1.5v-19.593l4.5 4.5 1.061-1.061z"
/>
</svg>
/>
</th>
<th
class="position-relative pr-4"
Expand All @@ -703,25 +643,10 @@ exports[`CDataTable renders correctly 2`] = `
<svg
class="c-icon c-icon-custom-size icon-transition position-absolute arrow-position transparent"
viewBox="0 0 24 24"
viewBox="0 0 64 64"
width="18"
xmlns="http://www.w3.org/2000/svg"
>
<title>
arrow-top
</title>
<path
d="M18.311 7.061l-6.311-6.311-6.31 6.311 1.061 1.061 4.5-4.5v19.593h1.5v-19.593l4.5 4.5 1.061-1.061z"
/>
</svg>
/>
</th>
</tr>
</tfoot>
Expand Down

0 comments on commit 125fd5e

Please sign in to comment.