-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2023 from sahilmob/staging
feat(kibbeh): ProfileHeaderWrapper component
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
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,26 @@ | ||
import React from "react"; | ||
import { Story } from "@storybook/react"; | ||
import profileCover from "./img/profile-cover.png"; | ||
|
||
import { | ||
ProfileHeaderWrapper, | ||
ProfileHeaderWrapperProps, | ||
} from "../ui/ProfileHeaderWrapper"; | ||
|
||
export default { | ||
title: "ProfileHeaderWrapper", | ||
component: ProfileHeaderWrapper, | ||
}; | ||
|
||
const ProfileHeaderChildren = () => ( | ||
<div className="text-accent">Profile header content</div> | ||
); | ||
|
||
ProfileHeaderWrapper.defaultProps = { | ||
coverUrl: profileCover, | ||
children: <ProfileHeaderChildren />, | ||
}; | ||
|
||
export const Main: Story<ProfileHeaderWrapperProps> = ({ ...props }) => ( | ||
<ProfileHeaderWrapper {...props} /> | ||
); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,23 @@ | ||
import React, { ReactNode } from "react"; | ||
|
||
export interface ProfileHeaderWrapperProps { | ||
children: ReactNode; | ||
coverUrl: string; | ||
} | ||
|
||
export const ProfileHeaderWrapper: React.FC<ProfileHeaderWrapperProps> = ({ | ||
children, | ||
coverUrl, | ||
...props | ||
}) => { | ||
return ( | ||
<div className="bg-primary-800 rounded-8" {...props}> | ||
<img | ||
alt="cover" | ||
src={coverUrl} | ||
className="rounded-t-8 w-full object-cover" | ||
/> | ||
<div className="p-4">{children}</div> | ||
</div> | ||
); | ||
}; |
fb96b76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
next-dogehouse – ./kibbeh
next-dogehouse.vercel.app
next-dogehouse-git-staging-benawad.vercel.app
next-dogehouse-benawad.vercel.app
next.dogehouse.tv
fb96b76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
storybook-dogehouse – ./kibbeh
dogehouse.vercel.app
storybook-dogehouse-git-staging-benawad.vercel.app
storybook-dogehouse-benawad.vercel.app