-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: improved Upper Slider,lower Slider,fix Responsiveness of EventPage
- Loading branch information
Showing
17 changed files
with
133 additions
and
111 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
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
11 changes: 0 additions & 11 deletions
11
src/components/EventsPage/Carousel/DescriptionCarousel/Description.style.jsx
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { useState } from 'react'; | ||
|
||
function ReadMore({ text, charLimit = 120 }) { | ||
const [isExpanded, setIsExpanded] = useState(false); | ||
|
||
const toggleReadMore = () => { | ||
setIsExpanded(!isExpanded); | ||
}; | ||
|
||
const renderText = () => { | ||
if (text.length <= charLimit) { | ||
return text; | ||
} | ||
|
||
if (isExpanded) { | ||
return ( | ||
<> | ||
{text}... | ||
<spa onClick={toggleReadMore} className='text-[#23757e] cursor-pointer'> | ||
Show Less | ||
</spa> | ||
</> | ||
); | ||
} else { | ||
return ( | ||
<> | ||
{text.slice(0, charLimit)}... | ||
<span onClick={toggleReadMore} className='text-[#23757e] cursor-pointer'> | ||
Read More | ||
</span> | ||
</> | ||
); | ||
} | ||
}; | ||
|
||
return <>{renderText()}</>; | ||
} | ||
|
||
export default ReadMore; |
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
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
src/components/EventsSection/eventCardComponents/Card.styles.jsx
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,6 @@ | ||
import tw from 'twin.macro'; | ||
import styled from 'styled-components'; | ||
|
||
export const CardContainer = styled.div` | ||
${tw`w-[270px] xxs:w-[310px] xsm:w-[347px] h-[416px] flex justify-center items-center text-[24px] font-spaceX leading-[37px] break-words text-center rounded-3xl`}; | ||
`; |
File renamed without changes.
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
Oops, something went wrong.