Skip to content

Commit

Permalink
put the dir attribute on a wrapper div
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Jan 4, 2021
1 parent 8d9f1cf commit b41172d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions packages/@uppy/dashboard/src/components/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ module.exports = function Dashboard (props) {
const noFiles = props.totalFileCount === 0
const isSizeMD = props.containerWidth > WIDTH_MD

const wrapperClassName = classNames({
'uppy-Root': props.isTargetDOMEl
})

const dashboardClassName = classNames({
'uppy-Root': props.isTargetDOMEl,
'uppy-Dashboard': true,
'uppy-Dashboard--animateOpenClose': props.animateOpenClose,
'uppy-Dashboard--isClosing': props.isClosing,
Expand All @@ -49,10 +52,9 @@ module.exports = function Dashboard (props) {

const showFileList = props.showSelectedFiles && !noFiles

return (
const dashboard = (
<div
class={dashboardClassName}
dir={props.direction}
data-uppy-theme={props.theme}
data-uppy-num-acquirers={props.acquirers.length}
data-uppy-drag-drop-supported={isDragDropSupported()}
Expand Down Expand Up @@ -132,4 +134,11 @@ module.exports = function Dashboard (props) {
</div>
</div>
)

return (
// Wrap it for RTL language support
<div class={wrapperClassName} dir={props.direction}>
{dashboard}
</div>
)
}

0 comments on commit b41172d

Please sign in to comment.