Skip to content
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

Hover effect of About US page is fixed #266 #289

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 8 additions & 11 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
useLocation,
} from 'react-router-dom';

import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
//import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import ScrollProgressBar from './components/ScrollProgress'; // Import your ScrollProgressBar component
import PricingDetailPage from './components/PricingDetailPage';

Expand Down Expand Up @@ -39,10 +39,10 @@ import ContactUsDetailsPage from './components/ContactUsDetailsPage';
import PaginationDetails from './components/PaginationDetails';
import TestimonialDetails from './components/TestimonialDetails';
import Footer from './components/Footer';
import Statistic from './components/StatisticDetails';
import GalleryDetailsPage from './components/GalleryDetailsPage';
import Checkbox from './components/Checkbox';
import Statistic from './components/StatisticDetails';
import GalleryDetailsPage from './components/GalleryDetailsPage';
import Checkbox from './components/Checkbox';

const App: React.FC = () => {
return (
<Router>
Expand Down Expand Up @@ -79,17 +79,14 @@ const App: React.FC = () => {
<Route path='/contact-details' element={<ContactUsDetailsPage />} />
<Route path='/pagination-details' element={<PaginationDetails />} />
<Route path='/testimonial-details' element={<TestimonialDetails />} />
<Route path='/statistic-details' element={<Statistic />} />
<Route path='/gallery-details' element={<GalleryDetailsPage />} />
<Route path='/statistic-details' element={<Statistic />} />
<Route path='/gallery-details' element={<GalleryDetailsPage />} />


<Route path='/checkbox' element={<Checkbox />} />

<Route path='*' element={<NotFoundPage />} />
</Routes>

<ConditionalFooter />

</Router>
);
};
Expand Down
10 changes: 6 additions & 4 deletions src/components/AboutUsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ const AboutUsHeader = styled.div`
}

h1:hover {
transform: scale(1.1); // Scale up the heading on hover
transform: scale(1.2) rotate(0deg); // Scale and rotate for dynamic effect
text-shadow: 0px 0px 20px rgba(255, 255, 255, 0.5); // Stronger glow
}

p {
Expand All @@ -100,7 +101,7 @@ const AboutUsContent = styled.section`
margin-bottom: 30px; // Space below the content section
display: flex; // Flexbox for vertical layout
flex-direction: column; // Arrange children in a column
gap: 20px; // Space between sections
gap: 25px; // Space between sections

h2 {
font-size: 2em; // Increase font size for subheadings
Expand All @@ -111,9 +112,10 @@ const AboutUsContent = styled.section`
}

h2:hover {
color: #2980b9; // Change color on hover
color: #ffffff; // Slightly darker blue on hover
transform: translateX(5px); // Slide right slightly
//text-shadow: 1px 1px 5px rgba(52, 152, 219, 0.8); // Glow effect
}

p {
font-size: 1.2em; // Larger font size for paragraph text
color: #f9f9f9; // Light gray color for text
Expand Down
17 changes: 8 additions & 9 deletions src/components/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import React, { useState } from 'react';

import CheckboxDetails from './CheckboxDetails';
import CheckboxDetails from './CheckboxDetails'; // Ensure the path is correct

const Checkbox: React.FC = () => {
const [isChecked, setIsChecked] = useState(false);

return (
<div>
<CheckboxDetails
checked={isChecked}
onChange={checked => setIsChecked(checked)}
label='I agree to the terms'
size='medium'
borderColor='#4A90E2'
backgroundColor='#E5F1FB'
checkColor='#007bff'
//checked={setIsChecked}
//onChange={setIsChecked} // Directly pass setIsChecked
//label="I agree to the terms"
//size="medium" // Pass size if necessary
//borderColor="#4A90E2" // Pass border color
//backgroundColor="#fff" // Pass background color
//checkColor="#000" // Pass check color
/>
</div>
);
Expand Down
21 changes: 9 additions & 12 deletions src/components/CheckboxDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@ import { ArrowLeft, Copy, Check } from 'lucide-react';
import BackToTopButton from './BackToTop';

// Custom Checkbox component
const Checkbox = ({
checked,
onChange,
label,
}: {
interface CheckboxProps {
checked: boolean;
onChange: () => void;
onChange: (checked: boolean) => void; // Updated to accept boolean
label: string;
}) => (
}

const Checkbox: React.FC<CheckboxProps> = ({ checked, onChange, label }) => (
<label className='inline-flex items-center'>
<input
type='checkbox'
checked={checked}
onChange={onChange}
onChange={() => onChange(!checked)} // Toggle checked state
className='form-checkbox h-5 w-5 text-blue-600 rounded'
/>
<span className='ml-2 text-white'>{label}</span>
Expand All @@ -29,11 +27,11 @@ const CheckboxDetailsPage: React.FC = () => {
const [copiedStates, setCopiedStates] = useState<{ [key: string]: boolean }>(
{},
);
const [isChecked, setIsChecked] = useState<any>(false);
const [isChecked, setIsChecked] = useState(false); // Changed to boolean

const getGlassyClasses = (opacity = 20) => {
return `backdrop-filter backdrop-blur-lg bg-white bg-opacity-${opacity}
border border-white border-opacity-20 rounded-lg shadow-lg transition-all duration-300`;
border border-white border-opacity-20 rounded-lg shadow-lg transition-all duration-300`;
};

const copyToClipboard = (text: string, key: string) => {
Expand Down Expand Up @@ -79,7 +77,6 @@ const CheckboxDetailsPage: React.FC = () => {
checked={isChecked}
onChange={() => setIsChecked(!isChecked)}
label="Custom Styled Checkbox"
className={getGlassyClasses()}
/>`;

const propsTable = (
Expand Down Expand Up @@ -165,7 +162,7 @@ const CheckboxDetailsPage: React.FC = () => {
<div className='relative mt-8'>
<Checkbox
checked={isChecked}
onChange={() => setIsChecked(!isChecked)}
onChange={setIsChecked} // Directly pass setIsChecked
label='Custom Styled Checkbox'
/>
<pre className='bg-gray-800 text-white p-6 rounded-lg mt-4 overflow-x-auto whitespace-pre-wrap max-sm:text-[0.55rem]'>
Expand Down
28 changes: 2 additions & 26 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import { Link } from 'react-router-dom';
import GoogleTranslate from './GoogleTranslator';


const Footer: React.FC = () => {
return (
<footer className='glass-footer'>
Expand All @@ -27,6 +26,7 @@ const Footer: React.FC = () => {
<GoogleTranslate />
</div>
</div>

<div className='footer-bottom'>
<a
href='https://github.com/Jaishree2310/GlassyUI-Components'
Expand Down Expand Up @@ -128,31 +128,7 @@ const Footer: React.FC = () => {
}
}
`}</style>
<div>
<p
style={{
fontSize: '14px',
color: '#fff',
position: 'relative',
right: '-300px',
}}
>
&copy; 2024 GlassyUI. All rights reserved.
</p>
<div
style={{
fontSize: '14px',
color: '#fff',
position: 'relative',
right: '-300px',
top: '10px',
}}
>
<GoogleTranslate />
</div>
</div>
</footer>
</>
</footer>
);
};

Expand Down
Loading