+12
-6
lines changedFilter options
+12
-6
lines changed Original file line number Diff line number Diff line change
@@ -18,12 +18,18 @@ export const BMediaAside = /*#__PURE__*/ Vue.extend({
18
18
functional: true,
19
19
props,
20
20
render(h, { props, data, children }) {
21
+
const align =
22
+
props.verticalAlign === 'top'
23
+
? 'start'
24
+
: props.verticalAlign === 'bottom'
25
+
? 'end'
26
+
: props.verticalAlign
21
27
return h(
22
28
props.tag,
23
29
mergeData(data, {
24
30
staticClass: 'd-flex',
25
31
class: {
26
-
[`align-self-${props.verticalAlign}`]: props.verticalAlign
32
+
[`align-self-${align}`]: align
27
33
}
28
34
}),
29
35
children
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ describe('media-aside', () => {
7
7
8
8
expect(wrapper.is('div')).toBe(true)
9
9
expect(wrapper.classes()).toContain('d-flex')
10
-
expect(wrapper.classes()).toContain('align-self-top')
10
+
expect(wrapper.classes()).toContain('align-self-start')
11
11
expect(wrapper.text()).toEqual('')
12
12
})
13
13
@@ -20,7 +20,7 @@ describe('media-aside', () => {
20
20
21
21
expect(wrapper.is('span')).toBe(true)
22
22
expect(wrapper.classes()).toContain('d-flex')
23
-
expect(wrapper.classes()).toContain('align-self-top')
23
+
expect(wrapper.classes()).toContain('align-self-start')
24
24
expect(wrapper.classes().length).toBe(2)
25
25
expect(wrapper.text()).toEqual('')
26
26
})
@@ -34,7 +34,7 @@ describe('media-aside', () => {
34
34
35
35
expect(wrapper.is('div')).toBe(true)
36
36
expect(wrapper.classes()).toContain('d-flex')
37
-
expect(wrapper.classes()).toContain('align-self-bottom')
37
+
expect(wrapper.classes()).toContain('align-self-end')
38
38
expect(wrapper.classes().length).toBe(2)
39
39
})
40
40
@@ -47,7 +47,7 @@ describe('media-aside', () => {
47
47
48
48
expect(wrapper.is('div')).toBe(true)
49
49
expect(wrapper.classes()).toContain('d-flex')
50
-
expect(wrapper.classes()).toContain('align-self-top')
50
+
expect(wrapper.classes()).toContain('align-self-start')
51
51
expect(wrapper.classes().length).toBe(2)
52
52
expect(wrapper.findAll('b').length).toBe(1)
53
53
expect(wrapper.find('b').text()).toBe('foobar')
Original file line number Diff line number Diff line change
@@ -139,7 +139,7 @@ describe('media', () => {
139
139
// Should have only two child elements
140
140
expect(wrapper.findAll('.media > *').length).toBe(2)
141
141
// Should have media aside with self align bottom
142
-
expect(wrapper.find('.d-flex').classes()).toContain('align-self-bottom')
142
+
expect(wrapper.find('.d-flex').classes()).toContain('align-self-end')
143
143
// Should have content in aside
144
144
expect(wrapper.find('.d-flex').text()).toEqual('foobar')
145
145
})
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4