diff options
| author | shpuld <shp@cock.li> | 2019-04-22 17:24:35 +0300 |
|---|---|---|
| committer | shpuld <shp@cock.li> | 2019-04-22 17:24:35 +0300 |
| commit | d4179454277c10a3e2fda9f62b61a18151693d17 (patch) | |
| tree | 57adbec33bbe9e30e0463579807c097a18b2d56f /src/hocs | |
| parent | 75a650aa6de13eaf1e0e17d5ec7bfffeee0db212 (diff) | |
| parent | c8f967d5c0424c7dd504ad4afeaefb7c745eed31 (diff) | |
Merge branch 'develop' into brendenbice1222/pleroma-fe-issues/pleroma-fe-202-show-boosted-users
Diffstat (limited to 'src/hocs')
| -rw-r--r-- | src/hocs/with_list/with_list.js | 40 | ||||
| -rw-r--r-- | src/hocs/with_list/with_list.scss | 6 | ||||
| -rw-r--r-- | src/hocs/with_load_more/with_load_more.scss | 8 |
3 files changed, 7 insertions, 47 deletions
diff --git a/src/hocs/with_list/with_list.js b/src/hocs/with_list/with_list.js deleted file mode 100644 index 896f8fc8..00000000 --- a/src/hocs/with_list/with_list.js +++ /dev/null @@ -1,40 +0,0 @@ -import Vue from 'vue' -import map from 'lodash/map' -import isEmpty from 'lodash/isEmpty' -import './with_list.scss' - -const defaultEntryPropsGetter = entry => ({ entry }) -const defaultKeyGetter = entry => entry.id - -const withList = ({ - getEntryProps = defaultEntryPropsGetter, // function to accept entry and index values and return props to be passed into the item component - getKey = defaultKeyGetter // funciton to accept entry and index values and return key prop value -}) => (ItemComponent) => ( - Vue.component('withList', { - props: [ - 'entries', // array of entry - 'entryProps', // additional props to be passed into each entry - 'entryListeners' // additional event listeners to be passed into each entry - ], - render (createElement) { - return ( - <div class="with-list"> - {map(this.entries, (entry, index) => { - const props = { - key: getKey(entry, index), - props: { - ...this.$props.entryProps, - ...getEntryProps(entry, index) - }, - on: this.$props.entryListeners - } - return <ItemComponent {...props} /> - })} - {isEmpty(this.entries) && this.$slots.empty && <div class="with-list-empty-content faint">{this.$slots.empty}</div>} - </div> - ) - } - }) -) - -export default withList diff --git a/src/hocs/with_list/with_list.scss b/src/hocs/with_list/with_list.scss deleted file mode 100644 index c6e13d5b..00000000 --- a/src/hocs/with_list/with_list.scss +++ /dev/null @@ -1,6 +0,0 @@ -.with-list { - &-empty-content { - text-align: center; - padding: 10px; - } -}
\ No newline at end of file diff --git a/src/hocs/with_load_more/with_load_more.scss b/src/hocs/with_load_more/with_load_more.scss index 1a0a9c40..4cefe2be 100644 --- a/src/hocs/with_load_more/with_load_more.scss +++ b/src/hocs/with_load_more/with_load_more.scss @@ -1,10 +1,16 @@ + +@import '../../_variables.scss'; + .with-load-more { &-footer { padding: 10px; text-align: center; + border-top: 1px solid; + border-top-color: $fallback--border; + border-top-color: var(--border, $fallback--border); .error { font-size: 14px; } } -}
\ No newline at end of file +} |
