-
-
Notifications
You must be signed in to change notification settings - Fork 320
Add booking card component #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
shubhsk88
wants to merge
5
commits into
Charlie85270:main
Choose a base branch
from
shubhsk88:add-card-components
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
37a6c32
Adding the booking card component
shubhsk88 8d98404
Adding the component in the index file
shubhsk88 9b786c7
Fixing the styling of price
shubhsk88 f1d0649
Adding the dark mode
shubhsk88 d560c5d
Updating the image link and increasing the counter
shubhsk88 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains hidden or 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
96 changes: 96 additions & 0 deletions
96
components/kit/components/commerce/shopping/BookingCard.tsx
This file contains hidden or 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,96 @@ | ||
| import React, { FC } from "react"; | ||
|
|
||
| const BookingCard: FC = () => { | ||
| return ( | ||
| <div className="lg:flex max-w-2xl mx-auto overflow-hidden rounded-lg dark:text-gray-50 dark:bg-gray-900 shadow-lg"> | ||
| <img | ||
| className="lg:w-1/3 w-full lg:h-auto h-48 object-cover" | ||
| src="/images/landscape/9.jpg" | ||
| /> | ||
|
|
||
| <div> | ||
| <div className="bg-white dark:bg-gray-900 p-4"> | ||
| <h2 className="font-bold text-gray-900 dark:text-gray-50 text-2xl"> | ||
| Amsterdam Walking Tour | ||
| </h2> | ||
|
|
||
| <div className="text-gray-500 dark:text-gray-200 py-2"> | ||
| Explore popular destinations as well as hidden local favourtes | ||
| </div> | ||
| </div> | ||
| <div className="bg-gray-50 dark:bg-gray-800 w-full p-4 flex h-full justify-between"> | ||
| <div> | ||
| <div className="text-lg py-1 text-gray-500 dark:text-gray-200"> | ||
| <span className="font-bold text-black dark:text-white pr-1"> | ||
| $17 | ||
| </span>{" "} | ||
| per person | ||
| <sup>*</sup> | ||
| </div> | ||
| <div className="text-gray-400 dark:text-gray-100 flex items-center"> | ||
| <div className="flex mr-2"> | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="16" | ||
| height="16" | ||
| className="fill-current text-green-400" | ||
| viewBox="0 0 24 24" | ||
| > | ||
| <path d="M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z" /> | ||
| </svg> | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="16" | ||
| height="16" | ||
| className="fill-current text-green-400" | ||
| viewBox="0 0 24 24" | ||
| > | ||
| <path d="M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z" /> | ||
| </svg> | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="16" | ||
| height="16" | ||
| className="fill-current text-green-400" | ||
| viewBox="0 0 24 24" | ||
| > | ||
| <path d="M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z" /> | ||
| </svg> | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="16" | ||
| height="16" | ||
| className="fill-current text-green-400" | ||
| viewBox="0 0 24 24" | ||
| > | ||
| <path d="M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z" /> | ||
| </svg> | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| width="16" | ||
| height="16" | ||
| className="fill-current text-green-400" | ||
| viewBox="0 0 24 24" | ||
| > | ||
| <path d="M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z" /> | ||
| </svg> | ||
| </div>{" "} | ||
| 28 reviews | ||
| </div> | ||
| <div className="text-gray-400 dark:text-gray-200 py-6"> | ||
| Price may very depending on selected date | ||
| </div> | ||
| </div> | ||
|
|
||
| <div> | ||
| <button className="bg-blue-700 dark:bg-blue-100 dark:text-gray-900 text-white px-4 py-2 focus:bg-blue-600 focus:border rounded shadow-lg "> | ||
| Book now | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default BookingCard; | ||
This file contains hidden or 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
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Images must be serve locally, please download this image on the project.
Then the image must be resized, compressed and optimised so that it is as light as possible (here around 30 ko).
You can do it with this tools : https://ezgif.com/resize for example.
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.
Can't you wrap that in the next image component if possible usually from version 10 I tend to use that in my projects