-
Notifications
You must be signed in to change notification settings - Fork 2
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 #4 from Scott170c/dev
merge dev to main
- Loading branch information
Showing
7 changed files
with
61 additions
and
23 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
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 |
---|---|---|
@@ -1,21 +1,50 @@ | ||
import { kMaxLength } from 'buffer'; | ||
import React from 'react'; | ||
|
||
import { Box } from 'theme-ui'; | ||
// Define the type for the props | ||
interface CardProps { | ||
question: string; | ||
answer: string; | ||
} | ||
|
||
// Create the component | ||
const FAQcard: React.FC<CardProps> = ({ question, answer }) => { | ||
return ( | ||
<div className="rounded-[20px] p-[16px] my-[16px] bg-[rgba(201,227,255,0.73)] shadow-[0_2px_4px_rgba(0,0,0,0.1)] w-[90vw] sm:w-auto md:w-auto lg:w-[26vw] sm:h-[auto] lg:h-[26vh] border-[5px] border-[rgba(39,114,193,0.42)] overflow-hidden"> | ||
<h3 className="text-[1rem] md:text-[calc(1vw+1vh)] font-[790] text-white pl-[2%] [text-shadow:_0_4px_4px_rgb(0_0_0_/_25%)] text-left break-words"> | ||
{question} | ||
</h3> | ||
<p className="text-[0.9rem] md:text-[calc(0.6vw+0.6vh)] text-[#003180] mt-[15px] font-[700] pl-[2%] text-left"> | ||
{answer} | ||
</p> | ||
</div> | ||
<Box sx={styles.card}> | ||
<h3 style={styles.question}>{question}</h3> | ||
<p style={styles.answer}>{answer}</p> | ||
</Box> | ||
); | ||
}; | ||
|
||
// Inline styles for the component | ||
const styles = { | ||
card: { | ||
borderRadius: '20px', | ||
padding: '16px', | ||
margin: '16px', | ||
backgroundColor: 'rgba(201, 227, 255, 0.73)', | ||
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)', | ||
height: ['fill-content', '16vw'], | ||
width: ['60vw', '26vw'], | ||
border: '5px solid rgba(39, 114, 193, 0.42)', | ||
overflow: 'hidden', | ||
}, | ||
question: { | ||
fontSize: 'calc(1.2vw + 1.2vh)', | ||
fontWeight: 790, | ||
color: '#FFFFFF', | ||
textShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)', | ||
paddingLeft: '2%', | ||
}, | ||
answer: { | ||
fontSize: 'calc(0.6vw + 0.6vh)', | ||
color: '#003180', | ||
marginTop: '8px', | ||
textShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)', | ||
fontWeight: 600, | ||
paddingLeft: '2%' | ||
}, | ||
}; | ||
|
||
export default FAQcard; |
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
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