Searchbar.style.tsx 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import styled from '@emotion/styled'
  2. import { colors, sizes } from '../../theme'
  3. import Button from '../Button'
  4. export const Input = styled.input`
  5. width: 100%;
  6. height: 100%;
  7. border: unset;
  8. padding: 14px ${sizes.b3}px;
  9. background-color: ${colors.gray[800]};
  10. color: ${colors.white};
  11. // override mobile Safari user agent styling
  12. border-radius: 0;
  13. -webkit-appearance: none;
  14. ::placeholder {
  15. color: ${colors.gray[400]};
  16. }
  17. :focus {
  18. background-color: ${colors.gray[900]};
  19. outline: 1px solid ${colors.gray[500]};
  20. }
  21. &::-webkit-search-cancel-button {
  22. -webkit-appearance: none;
  23. }
  24. `
  25. export const CancelButton = styled(Button)`
  26. position: absolute;
  27. right: 0;
  28. border: none;
  29. padding: 14px ${sizes.b3}px;
  30. color: ${colors.white};
  31. :focus,
  32. :hover {
  33. color: ${colors.white};
  34. }
  35. > svg {
  36. width: 100%;
  37. max-width: 17px;
  38. max-height: 17px;
  39. }
  40. `
  41. export const Container = styled.div`
  42. position: relative;
  43. display: flex;
  44. align-items: center;
  45. height: ${sizes.b12}px;
  46. `