-
-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
151 additions
and
105 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import classNames from 'classnames'; | ||
|
||
export type DrawerPropsType = { | ||
/** | ||
* Content to be rendered in the Drawer. | ||
*/ | ||
children: React.ReactNode; | ||
/** | ||
* Applies class names to the container element. | ||
*/ | ||
className?: string; | ||
/** | ||
* Sets if the content is visible. | ||
* @default false | ||
*/ | ||
isVisible?: boolean; | ||
}; | ||
|
||
function Drawer({ children, className, isVisible = false }: DrawerPropsType) { | ||
return ( | ||
<div | ||
className={classNames( | ||
className, | ||
'hidden lg:block transition-all ease-in-out duration-1000 fixed top-0 bottom-0 overflow-hidden width-full z-[2]', | ||
{ | ||
'-left-0': isVisible, | ||
'-left-full': !isVisible, | ||
}, | ||
)} | ||
> | ||
<div className="w-full h-full">{children}</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default Drawer; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import Drawer from '../Drawer'; | ||
|
||
type DrawerStorytype = StoryObj<typeof Drawer>; | ||
|
||
const meta: Meta<typeof Drawer> = { | ||
title: 'Drawer', | ||
component: Drawer, | ||
parameters: { | ||
viewport: { | ||
defaultViewport: 'tablet', | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
/** | ||
* Default Drawer supplied with only required args. | ||
*/ | ||
export const Default: DrawerStorytype = { | ||
render: args => <Drawer {...args} />, | ||
args: { | ||
children: 'Drawer content will only display on display size of Tablet or smaller', | ||
isVisible: true, | ||
}, | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 46 additions & 20 deletions
66
...onents/FeaturedJobItem/FeaturedJobItem.js → ...nents/FeaturedJobItem/FeaturedJobItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
components/FeaturedJobItem/__stories__/FeaturedJobItem.stories.js
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
components/FeaturedJobItem/__stories__/FeaturedJobItem.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import { descriptions } from 'common/constants/descriptions'; | ||
import FeaturedJobItem from '../FeaturedJobItem'; | ||
|
||
type FeaturedJobItemStoryType = StoryObj<typeof FeaturedJobItem>; | ||
|
||
const meta: Meta<typeof FeaturedJobItem> = { | ||
title: 'FeaturedJobItem', | ||
component: FeaturedJobItem, | ||
}; | ||
|
||
export default meta; | ||
|
||
/** | ||
* Default FeaturedJobItem supplied with only required args. | ||
*/ | ||
export const Default: FeaturedJobItemStoryType = { | ||
render: args => <FeaturedJobItem {...args} />, | ||
args: { | ||
title: 'Job Title', | ||
source: 'Company Name', | ||
sourceUrl: '#', | ||
description: descriptions.long, | ||
}, | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters