-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix: Crash on BobaScope * Fix: updated the test cases for history page --------- Co-authored-by: Sahil Kashetwar <sahil@enya.ai>
- Loading branch information
Showing
13 changed files
with
363 additions
and
312 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
packages/boba/gateway/src/components/global/searchInput/index.tsx
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,23 @@ | ||
import React, { ChangeEventHandler } from 'react' | ||
import { SearchInputContainer, Input } from './styles' | ||
import MagnifyingGlass from 'assets/images/icons/magnifyingGlass.svg' | ||
import { Svg } from 'components/global/svg' | ||
|
||
export interface SearchInputProps { | ||
placeholder: string | ||
value: string | ||
onChange: ChangeEventHandler<HTMLInputElement> | ||
} | ||
|
||
export const SearchInput = (props: SearchInputProps) => { | ||
return ( | ||
<SearchInputContainer> | ||
<Svg src={MagnifyingGlass} /> | ||
<Input // search bar styles | ||
placeholder="Search Here" | ||
value={props.value} | ||
onChange={props.onChange} | ||
/> | ||
</SearchInputContainer> | ||
) | ||
} |
75 changes: 75 additions & 0 deletions
75
packages/boba/gateway/src/components/global/searchInput/styles.ts
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,75 @@ | ||
import styled, { css } from 'styled-components' | ||
import { screen } from 'themes/screens' | ||
|
||
export const SearchInputContainer = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
font-size: 16px; | ||
border-radius: 12px; | ||
${(props) => | ||
props.theme.name === 'light' && | ||
css` | ||
background: ${props.theme.colors.gray[50]}; | ||
border: 1px solid ${props.theme.colors.gray[500]}; | ||
color: ${props.theme.colors.gray[600]}; | ||
fill: ${props.theme.colors.gray[600]}; | ||
&:hover { | ||
border: 1px solid ${props.theme.colors.green[800]}; | ||
} | ||
`} | ||
${(props) => | ||
props.theme.name === 'dark' && | ||
css` | ||
background: ${props.theme.colors.gray[500]}; | ||
border: 1px solid ${props.theme.colors.gray[300]}; | ||
color: ${props.theme.colors.gray[200]}; | ||
fill: ${props.theme.colors.gray[50]}; | ||
&:hover { | ||
border: 1px solid ${props.theme.colors.green[300]}; | ||
} | ||
`} | ||
div { | ||
padding-left: 5px; | ||
display: flex; | ||
} | ||
svg { | ||
width: 16px; | ||
height: auto; | ||
} | ||
@media ${screen.mobile} { | ||
width: 120px; | ||
height: 30px; | ||
svg { | ||
width: 8px; | ||
height: auto; | ||
} | ||
} | ||
` | ||
// TODO: get rid of duplicates | ||
export const Input = styled.input` | ||
flex: 1; | ||
padding: 10px; | ||
font-size: 16px; | ||
font-style: normal; | ||
font-weight: 500; | ||
background: transparent; | ||
box-shadow: none; | ||
outline: none; | ||
border: none; | ||
${(props) => | ||
props.theme.name === 'light' && | ||
css` | ||
color: ${props.theme.colors.gray[600]}; | ||
`} | ||
${(props) => | ||
props.theme.name === 'dark' && | ||
css` | ||
color: ${props.theme.colors.gray[200]}; | ||
`} | ||
@media ${screen.mobile} { | ||
width: 120px; | ||
font-size: 12px; | ||
} | ||
` |
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,59 @@ | ||
import styled, { css } from 'styled-components' | ||
import { Typography } from 'components/global' | ||
|
||
export const ExitsWrapper = styled.div` | ||
background: ${(props) => props.theme.colors.popup}; | ||
padding: 10px; | ||
border-radius: 12px; | ||
${(props) => | ||
props.theme.name === 'light' && | ||
css` | ||
border: solid 1px ${props.theme.colors.gray[400]}; | ||
&:hover { | ||
background: ${props.theme.colors.gray[300]}; | ||
border: solid 1px ${props.theme.colors.gray[500]}; | ||
} | ||
`} | ||
${(props) => | ||
props.theme.name === 'dark' && | ||
css` | ||
border: solid 1px ${props.theme.colors.gray[300]}; | ||
&:hover { | ||
background: ${props.theme.colors.gray[300]}; | ||
} | ||
`} | ||
` | ||
|
||
export const ExitWrapper = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: flex-start; | ||
gap: 5px; | ||
` | ||
|
||
export const HashContainer = styled(Typography)` | ||
${(props) => | ||
props.theme.name === 'light' && | ||
css` | ||
color: ${props.theme.colors.gray[700]}; | ||
`} | ||
${(props) => | ||
props.theme.name === 'dark' && | ||
css` | ||
color: ${props.theme.colors.gray[50]}; | ||
`} | ||
` | ||
|
||
export const Hash = styled.a` | ||
${(props) => | ||
props.theme.name === 'light' && | ||
css` | ||
color: ${props.theme.colors.gray[700]}; | ||
`} | ||
${(props) => | ||
props.theme.name === 'dark' && | ||
css` | ||
color: ${props.theme.colors.gray[50]}; | ||
`} | ||
` |
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.