Skip to content

Commit

Permalink
Merge pull request #1531 from ManishMadan2882/main
Browse files Browse the repository at this point in the history
Adding hover effects in Search component
  • Loading branch information
dartpain authored Jan 5, 2025
2 parents fb46cc9 + 8c586a3 commit 1941bd3
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions extensions/react-widget/src/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from '@radix-ui/react-icons';
const themes = {
dark: {
bg: '#000',
bg: '#202124',
text: '#EDEDED',
primary: {
text: "#FAFAFA",
Expand All @@ -29,7 +29,7 @@ const themes = {
}
},
light: {
bg: '#fff',
bg: '#EAEAEA',
text: '#171717',
primary: {
text: "#222327",
Expand Down Expand Up @@ -86,7 +86,7 @@ const SearchResults = styled.div`
display: flex;
flex-direction: column;
background-color: ${props => props.theme.primary.bg};
border: 1px solid ${props => props.theme.secondary.bg};
border: 1px solid ${props => props.theme.bg};
border-radius: 15px;
padding: 8px 0px 8px 0px;
width: 792px;
Expand Down Expand Up @@ -140,7 +140,7 @@ const Title = styled.h3`
const ContentWrapper = styled.div`
display: flex;
flex-direction: column;
gap: 8px;
gap: 12px;
`;
const Content = styled.div`
display: flex;
Expand Down Expand Up @@ -170,11 +170,12 @@ const ResultWrapper = styled.div`
align-items: flex-start;
width: 100%;
box-sizing: border-box;
padding: 12px 16px 0 16px;
padding: 8px 16px;
cursor: pointer;
background-color: ${props => props.theme.primary.bg};
font-family: 'Geist',sans-serif;
font-family: 'Geist', sans-serif;
transition: background-color 0.2s;
border-radius: 8px;
word-wrap: break-word;
overflow-wrap: break-word;
Expand All @@ -183,11 +184,8 @@ const ResultWrapper = styled.div`
overflow: hidden;
text-overflow: ellipsis;
&.contains-source:hover {
background-color: rgba(0, 92, 197, 0.15);
${Title} {
color: rgb(0, 126, 230);
}
&:hover {
background-color: ${props => props.theme.bg};
}
`
const Markdown = styled.div`
Expand Down Expand Up @@ -290,12 +288,11 @@ const AskAIButton = styled.button`
padding: 8px 24px;
border: none;
border-radius: 6px;
background-color: ${props => props.theme.secondary.bg};
background-color: ${props => props.theme.bg};
color: ${props => props.theme.text};
cursor: pointer;
transition: background-color 0.2s, box-shadow 0.2s;
font-size: 16px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
&:hover {
opacity: 0.8;
Expand All @@ -307,7 +304,7 @@ const SearchHeader = styled.div`
gap: 8px;
margin-bottom: 12px;
padding-bottom: 12px;
border-bottom: 1px solid ${props => props.theme.secondary.bg};
border-bottom: 1px solid ${props => props.theme.bg};
`

const TextField = styled.input`
Expand Down

0 comments on commit 1941bd3

Please sign in to comment.