Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101469586
SwipeArea.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 10, 18:36
Size
2 KB
Mime Type
text/x-java
Expires
Wed, Feb 12, 18:36 (2 d)
Engine
blob
Format
Raw Data
Handle
24171949
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
SwipeArea.js
View Options
import
_defineProperty
from
"@babel/runtime/helpers/esm/defineProperty"
;
import
_objectWithoutProperties
from
"@babel/runtime/helpers/esm/objectWithoutProperties"
;
import
_extends
from
"@babel/runtime/helpers/esm/extends"
;
import
*
as
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
clsx
from
'clsx'
;
import
styled
from
'../styles/styled'
;
import
capitalize
from
'../utils/capitalize'
;
import
{
isHorizontal
}
from
'../Drawer/Drawer'
;
import
{
jsx
as
_jsx
}
from
"react/jsx-runtime"
;
var
SwipeAreaRoot
=
styled
(
'div'
)(
function
(
_ref
)
{
var
theme
=
_ref
.
theme
,
ownerState
=
_ref
.
ownerState
;
return
_extends
({
position
:
'fixed'
,
top
:
0
,
left
:
0
,
bottom
:
0
,
zIndex
:
theme
.
zIndex
.
drawer
-
1
},
ownerState
.
anchor
===
'left'
&&
{
right
:
'auto'
},
ownerState
.
anchor
===
'right'
&&
{
left
:
'auto'
,
right
:
0
},
ownerState
.
anchor
===
'top'
&&
{
bottom
:
'auto'
,
right
:
0
},
ownerState
.
anchor
===
'bottom'
&&
{
top
:
'auto'
,
bottom
:
0
,
right
:
0
});
});
/**
* @ignore - internal component.
*/
var
SwipeArea
=
/*#__PURE__*/
React
.
forwardRef
(
function
SwipeArea
(
props
,
ref
)
{
var
anchor
=
props
.
anchor
,
_props$classes
=
props
.
classes
,
classes
=
_props$classes
===
void
0
?
{}
:
_props$classes
,
className
=
props
.
className
,
width
=
props
.
width
,
style
=
props
.
style
,
other
=
_objectWithoutProperties
(
props
,
[
"anchor"
,
"classes"
,
"className"
,
"width"
,
"style"
]);
var
ownerState
=
props
;
return
/*#__PURE__*/
_jsx
(
SwipeAreaRoot
,
_extends
({
className
:
clsx
(
'PrivateSwipeArea-root'
,
classes
.
root
,
classes
[
"anchor"
.
concat
(
capitalize
(
anchor
))],
className
),
ref
:
ref
,
style
:
_extends
(
_defineProperty
({},
isHorizontal
(
anchor
)
?
'width'
:
'height'
,
width
),
style
),
ownerState
:
ownerState
},
other
));
});
process
.
env
.
NODE_ENV
!==
"production"
?
SwipeArea
.
propTypes
=
{
/**
* Side on which to attach the discovery area.
*/
anchor
:
PropTypes
.
oneOf
([
'left'
,
'top'
,
'right'
,
'bottom'
]).
isRequired
,
/**
* @ignore
*/
classes
:
PropTypes
.
object
,
/**
* @ignore
*/
className
:
PropTypes
.
string
,
/**
* @ignore
*/
style
:
PropTypes
.
object
,
/**
* The width of the left most (or right most) area in `px` where the
* drawer can be swiped open from.
*/
width
:
PropTypes
.
number
.
isRequired
}
:
void
0
;
export
default
SwipeArea
;
Event Timeline
Log In to Comment