0.4.23 • Published 4 years ago

@paprika/sidepanel v0.4.23

Weekly downloads
3,808
License
MIT
Repository
github
Last release
4 years ago

@paprika/sidepanel - 0.4.22-alpha.1

Description

The SidePanel component provides a view that slides in from one side so the user can maintain context of their main task while they work on a sub task.

Installation

yarn add @paprika/sidepanel

or with npm:

npm install @paprika/sidepanel

Props

SidePanel

PropTyperequireddefaultDescription
a11yTextstringfalsenull
childrennodetrue-The content for the SidePanel.
getPushContentElementfuncfalsenullFunction that provides the container DOM element to be pushed.
groupOffsetYnumberfalse0Y offset that is passed down from <SidePanel.Group>
isCompactboolfalsefalseControl the compactness of the side panel
isInlineboolfalsefalseRender the sidepanel inline
isOpenbooltrue-Control the visibility of the side panel. This prop makes the side panel appear
isSlideFromLeftboolfalsefalseControl if the side panel slides from the left
kind SidePanel.types.kind.DEFAULT, SidePanel.types.kind.CHILD, SidePanel.types.kind.PRIMARYfalseSidePanel.types.kind.DEFAULTModify the look of the SidePanel
offsetYnumberfalse0Control y offset of the sidepanel
onAfterClosefuncfalse() => {}Callback once the sidepanel has been closed event
onAfterOpenfuncfalse() => {}Callback once the sidepanel has been opened event
onClosefuncfalsenullCallback triggered when the side panel needs to be close
widthstring,numberfalse"33%"The width of the open panel.
zIndexnumberfalsezValue(7)Control the z position of the sidepanel

Components

You can use any of the following components to compose the SidePanel:

<SidePanel.Header />
<SidePanel.Footer />
<SidePanel.Overlay />
<SidePanel.FocusLock />
<SidePanel.Trigger />

Basic examples.

<SidePanel isOpen={isOpen} onClose={() => {}}>
  [...your_content...]
</SidePanel>
<SidePanel isOpen={isOpen} onClose={() => {}}>
  <SidePanel.Header>Your header</SidePanel.Header>
  [...your_content...]
  <SidePanel.Overlay />
</SidePanel>

Warnings

If the content you are putting into this component will try and control focus (like CKEditor), read this: https://github.com/acl-services/paprika/issues/453

Links

0.4.23

4 years ago

0.4.22-alpha.4

4 years ago

0.4.22-alpha.3

4 years ago

0.4.22-alpha.2

4 years ago

0.4.22-alpha.1

4 years ago

0.4.22-alpha.0

4 years ago

0.4.21

4 years ago

0.4.20

4 years ago

0.4.19

4 years ago

0.4.18

4 years ago

0.4.17

4 years ago

0.4.16

4 years ago

0.4.15

4 years ago

0.4.14

4 years ago

0.4.13

4 years ago

0.4.12

4 years ago

0.4.10

4 years ago

0.4.11

4 years ago

0.4.9

4 years ago

0.4.8

4 years ago

0.4.7

4 years ago

0.4.6

4 years ago

0.4.5

4 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.24

5 years ago

0.3.23

5 years ago

0.3.22

5 years ago

0.3.21

5 years ago

0.3.20

5 years ago

0.3.19

5 years ago

0.3.18

5 years ago

0.3.17

5 years ago

0.3.16

5 years ago

0.3.15

5 years ago

0.3.14

5 years ago

0.3.13

5 years ago

0.3.12

5 years ago

0.3.11

5 years ago

0.3.10

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

6 years ago