Skip to content

Commit

Permalink
chore: update react and vue plugin after breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
Grsmto committed Nov 20, 2018
1 parent 64dc9cd commit 5d5acd1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
16 changes: 6 additions & 10 deletions packages/simplebar-react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,25 @@ import PropTypes from 'prop-types';
import 'simplebar';

export default function SimpleBar({ children, ...options }) {
return (
<div data-simplebar {...options}>
return <div data-simplebar {...options}>
<div className="simplebar-wrapper">
<div className="simplebar-height-auto-observer-wrapper">
<div className="simplebar-height-auto-observer"></div>
<div className="simplebar-height-auto-observer" />
</div>
<div className="simplebar-mask">
<div className="simplebar-offset">
<div className="simplebar-content">
{children}
</div>
<div className="simplebar-content">{children}</div>
</div>
</div>
<div className="simplebar-placeholder" />
</div>
<div className="simplebar-track horizontal">
<div className="simplebar-track simplebar-horizontal">
<div className="simplebar-scrollbar" />
</div>
<div className="simplebar-track vertical">
<div className="simplebar-track simplebar-vertical">
<div className="simplebar-scrollbar" />
</div>
</div>
);
</div>;
}

SimpleBar.propTypes = {
Expand Down
24 changes: 19 additions & 5 deletions packages/simplebar-vue/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,25 @@
<div
data-simplebar
>
<div class="simplebar-scroll-content">
<div class="simplebar-content">
<slot></slot>
<div class="simplebar-wrapper">
<div class="simplebar-height-auto-observer-wrapper">
<div class="simplebar-height-auto-observer" />
</div>
<div class="simplebar-mask">
<div class="simplebar-offset">
<div class="simplebar-content">
<slot></slot>
</div>
</div>
</div>
<div class="simplebar-placeholder" />
</div>
<div class="simplebar-track simplebar-horizontal">
<div class="simplebar-scrollbar" />
</div>
<div class="simplebar-track simplebar-vertical">
<div class="simplebar-scrollbar" />
</div>
</div>
</div>
</template>

Expand All @@ -15,4 +29,4 @@ import 'simplebar';
export default {
name: 'simplebar-vue'
}
</script>
</script>

0 comments on commit 5d5acd1

Please sign in to comment.