Skip to content

Commit 9c97d26

Browse files
committed
color's derived from theme
1 parent 3f2cbcb commit 9c97d26

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

apps/synapse-portal-framework/src/components/HeaderSearchBox.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
import { Box, Stack, SxProps, Typography, Button } from '@mui/material'
1+
import {
2+
Box,
3+
Stack,
4+
SxProps,
5+
Typography,
6+
Button,
7+
lighten,
8+
useTheme,
9+
} from '@mui/material'
210
import PortalFullTextSearchField from './PortalSearch/PortalFullTextSearchField'
311
import { spreadSx } from 'synapse-react-client/theme/spreadSx'
412
import { useSearchParams } from 'react-router'
@@ -17,6 +25,7 @@ const HeaderSearchBox = ({
1725
sx,
1826
}: HeaderSearchBoxProps) => {
1927
const [, setSearchParams] = useSearchParams()
28+
const theme = useTheme()
2029

2130
const handleTermClick = (term: string) => {
2231
const trimmedTerm = term.trim()
@@ -80,16 +89,17 @@ const HeaderSearchBox = ({
8089
{searchExampleTerms &&
8190
searchExampleTerms.map(term => (
8291
<Button
92+
variant="contained"
8393
onClick={() => handleTermClick(term)}
8494
sx={{
8595
borderRadius: '30px',
86-
border: '1px solid #ECF2F5',
87-
background: '#E5E9F1',
96+
border: '1px solid',
97+
borderColor: lighten(theme.palette.primary.main, 0.9),
8898
padding: '7px 9px',
8999
textDecoration: 'none !important',
90-
variant: 'contained',
100+
backgroundColor: lighten(theme.palette.primary.main, 0.8),
91101
'&:hover': {
92-
background: '#D6DAE5',
102+
background: lighten(theme.palette.primary.main, 0.7),
93103
},
94104
}}
95105
>

0 commit comments

Comments
 (0)