Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3d24789

Browse filesBrowse files
committed
Merge branch 'media' into woothu
2 parents 6ae7fe3 + 4501dd9 commit 3d24789
Copy full SHA for 3d24789

File tree

3 files changed

+41
-0
lines changed
Filter options

3 files changed

+41
-0
lines changed

‎src/components/Media/CMedia.js

Copy file name to clipboard
+32Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { mergeData } from 'vue-functional-data-merge'
2+
3+
export default {
4+
functional: true,
5+
name: 'CMedia',
6+
props: {
7+
asideClasses: String,
8+
asideRight: Boolean,
9+
},
10+
render (h, { props, data, slots }) {
11+
let childNodes = []
12+
const $slots = slots()
13+
const asideClasses = props.asideClasses ?
14+
props.asideClasses :
15+
props.asideRight ?
16+
'ml-3 align-self-start' :
17+
'mr-3 align-self-start'
18+
19+
const aside = h(
20+
'div',
21+
{ class: asideClasses },
22+
$slots.aside
23+
)
24+
const body = h(
25+
'div',
26+
{ staticClass: 'media-body' },
27+
$slots.default
28+
)
29+
props.asideRight ? childNodes.push(body, aside) : childNodes.push(aside, body)
30+
return h('div', mergeData(data, { staticClass: 'media' }), childNodes)
31+
}
32+
}

‎src/components/Media/index.js

Copy file name to clipboard
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import CMedia from './CMedia'
2+
3+
export {
4+
CMedia
5+
}

‎src/components/index.js

Copy file name to clipboardExpand all lines: src/components/index.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ export * from './Dropdown'
1818
export * from './ListGroup'
1919
<<<<<<< HEAD
2020
<<<<<<< HEAD
21+
<<<<<<< HEAD
2122
export * from './Toolip'
2223
=======
2324
export * from './Pagination'
2425
>>>>>>> pagination
2526
=======
2627
export * from './Navbar'
2728
>>>>>>> navbar
29+
=======
30+
export * from './Media'
31+
>>>>>>> media

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.