diff --git a/src/components/nps/nps-drawer.tsx b/src/components/nps/nps-drawer.tsx
new file mode 100644
index 00000000..23cfa228
--- /dev/null
+++ b/src/components/nps/nps-drawer.tsx
@@ -0,0 +1,38 @@
+import React from 'react'
+import Drawer from 'components/drawer'
+import { DrawerPlacement } from 'components/drawer/drawer'
+import { NPSInput } from './nps'
+
+export type NPSDrawerProps = {
+ visible: boolean
+ title?: string
+ message?: (score: number) => React.ReactNode
+ onSubmit?: (score: number) => void
+ onDismiss?: () => void
+}
+
+export function NPSDrawer({
+ visible,
+ title,
+ message,
+ onSubmit,
+ onDismiss,
+}: NPSDrawerProps) {
+ return (
+
+
+
+ )
+}
diff --git a/src/components/nps/nps.stories.tsx b/src/components/nps/nps.stories.tsx
index 8aea355c..ce5e6dc7 100644
--- a/src/components/nps/nps.stories.tsx
+++ b/src/components/nps/nps.stories.tsx
@@ -3,6 +3,7 @@ import { Meta } from '@storybook/react/types-6-0'
import { action } from '@storybook/addon-actions'
import Button from 'components/button'
import { NPSInput } from './nps'
+import { NPSDrawer } from './nps-drawer'
export default {
title: 'Survey/NPS',
@@ -60,3 +61,22 @@ export function WithCustomMessage() {
)
}
+
+export function NPSInDrawer() {
+ const [show, setShow] = useState(false)
+
+ function showDrawer() {
+ setShow(true)
+ }
+
+ function onClose() {
+ setShow(false)
+ }
+
+ return (
+ <>
+
+
+ >
+ )
+}
diff --git a/yarn.lock b/yarn.lock
index 14a3c265..d2d4d25f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5039,7 +5039,31 @@ debug@^3.0.0:
dependencies:
ms "^2.1.1"
+<<<<<<< Updated upstream
decamelize@^1.2.0:
+=======
+debug@^4.0.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1"
+ integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==
+ dependencies:
+ ms "2.1.2"
+
+debuglog@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
+ integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
+
+decamelize-keys@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9"
+ integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=
+ dependencies:
+ decamelize "^1.1.0"
+ map-obj "^1.0.0"
+
+decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.2.0:
+>>>>>>> Stashed changes
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
@@ -8533,6 +8557,27 @@ lodash-es@^4.17.15:
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78"
integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==
+<<<<<<< Updated upstream
+=======
+lodash._baseuniq@~4.6.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
+ integrity sha1-DrtE5FaBSveQXGIS+iybLVG4Qeg=
+ dependencies:
+ lodash._createset "~4.0.0"
+ lodash._root "~3.0.0"
+
+lodash._createset@~4.0.0:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
+ integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=
+
+lodash._root@~3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
+ integrity sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=
+
+>>>>>>> Stashed changes
lodash.camelcase@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"