Skip to content

Commit

Permalink
fix(deps): fix deps
Browse files Browse the repository at this point in the history
  • Loading branch information
sondh0127 committed Sep 7, 2020
1 parent 05af18d commit 4d1bba2
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 25 deletions.
4 changes: 3 additions & 1 deletion packages/dialog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
"@retail-ui/action-buttons": "^0.5.0",
"@retail-ui/heroicons": "^0.2.7",
"@retail-ui/hooks": "^0.3.0",
"@retail-ui/transition": "^0.4.0",
"@retail-ui/transition": "^0.4.0"
},
"dependencies": {
"react-focus-lock": "^2.4.1"
}
}
4 changes: 3 additions & 1 deletion packages/drawer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
"@retail-ui/button-icon": "^0.5.0",
"@retail-ui/heroicons": "^0.2.7",
"@retail-ui/hooks": "^0.3.0",
"@retail-ui/transition": "^0.4.0",
"@retail-ui/transition": "^0.4.0"
},
"dependencies": {
"react-focus-lock": "^2.4.1"
}
}
2 changes: 1 addition & 1 deletion packages/drawer/src/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type DrawerPosition = keyof typeof DrawerStyles['position']
export type DrawerProps = {
isOpen: boolean
onClose: () => void
onSubmit: () => void
onSubmit?: () => void
size?: DrawerSize
position?: DrawerPosition
}
Expand Down
2 changes: 1 addition & 1 deletion packages/drawer/src/DrawerHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const DrawerHeader: React.FC<DrawerHeaderProps> = (props) => {
<div className={cls}>
{children}
<ButtonIcon
icon={XSolid}
icon={<XSolid />}
variant="light"
onClick={onClose}
color="secondary"
Expand Down
2 changes: 1 addition & 1 deletion packages/drawer/src/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export const DrawerStyles = {
},
header: `flex justify-between items-center px-4 py-3 text-lg font-semibold border-b border-gray-200 text-gray-700 dark:text-gray-300`,
body: `p-4 mb-2 text-sm text-gray-700 dark:text-gray-400 relative flex-auto overflow-y-auto`,
footer: `flex flex-col items-center justify-end px-6 py-3 space-y-4 sm:space-y-0 sm:space-x-6 sm:flex-row bg-gray-200 dark:bg-gray-800`,
footer: `flex items-center justify-end px-6 py-3 space-y-4 sm:space-y-0 sm:space-x-6 sm:flex-row bg-gray-200 dark:bg-gray-800`,
}
// "
43 changes: 25 additions & 18 deletions packages/drawer/stories/Drawer.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Button } from '@retail-ui/button'
import * as React from 'react'

import {
Expand All @@ -15,24 +16,30 @@ const meta = {

export default meta

const Template = (args: DrawerProps) => (
<Drawer
{...args}
isOpen={false}
onClose={() => {}}
onSubmit={() => {}}
size="sm"
data-testid={meta.title}
>
<DrawerHeader>Basic: Drawer Title</DrawerHeader>
<DrawerBody>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laboriosam eius
fugiat illum repudiandae commodi inventore magnam unde vero cupiditate
molestiae?
</DrawerBody>
<DrawerFooter />
</Drawer>
)
const Template = (args: DrawerProps) => {
const [isOpen, setIsOpen] = React.useState(false)
return (
<React.Fragment>
<Button onClick={() => setIsOpen(!isOpen)}>Open drawer</Button>
<Drawer
{...args}
isOpen={isOpen}
onClose={() => setIsOpen(false)}
onSubmit={() => {}}
size="base"
data-testid={meta.title}
>
<DrawerHeader>Basic: Drawer Title</DrawerHeader>
<DrawerBody>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laboriosam
eius fugiat illum repudiandae commodi inventore magnam unde vero
cupiditate molestiae?
</DrawerBody>
<DrawerFooter />
</Drawer>
</React.Fragment>
)
}

export const Simple = Template.bind({})
// @ts-ignore
Expand Down
14 changes: 13 additions & 1 deletion packages/drawer/test/__snapshots__/Drawer.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Drawer renders correctly 1`] = `<DocumentFragment />`;
exports[`Drawer renders correctly 1`] = `
<DocumentFragment>
<button
class="inline-flex items-center justify-center leading-5 align-bottom transition-colors duration-150 ease-in transform scale-100 border cursor-pointer focus:outline-none dark:focus:shadow-outline-gray active:scale-95 overflow-hidden no-underline select-none text-white bg-purple-600 border-transparent active:shadow-outline-purple focus:bg-purple-700 hover:bg-purple-700 py-2 px-4 text-base font-medium rounded-lg"
>
<span
class="opacity-100"
>
Open drawer
</span>
</button>
</DocumentFragment>
`;
3 changes: 2 additions & 1 deletion packages/transition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"peerDependencies": {
"react": ">=16"
},
"devDependencies": {
"devDependencies": {},
"dependencies": {
"@tailwindui/react": "^0.1.1"
}
}

0 comments on commit 4d1bba2

Please sign in to comment.