Skip to content

Commit

Permalink
Revert "Apo 1022 seacoast search bar alignment (#238)" (#239)
Browse files Browse the repository at this point in the history
This reverts commit 71a12bf.
  • Loading branch information
redreceipt authored Nov 22, 2024
1 parent 71a12bf commit 96a8164
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions packages/web-shared/components/Searchbar/Searchbar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { MagnifyingGlass, ArrowLeft } from '@phosphor-icons/react';
import { themeGet } from '@styled-system/theme-get';

import { systemPropTypes } from '../../ui-kit/_lib/system';
import { Box } from '../../ui-kit';
Expand Down Expand Up @@ -36,12 +35,8 @@ const Searchbar = (props = {}) => {
const [isMobile, setIsMobile] = useState(false);
const [scrollPosition, setScrollPosition] = useState(0);

const textWelcome = (
// 0.35ch works out visually to be the width of a  
<strong style={{ marginRight: '0.35ch' }}>Hey{firstName !== '' ? ` ${firstName}` : ''}!</strong>
);

const placeholderWidth = isMobile ? { width: '400px' } : { width: '225px' };
const textWelcome =
firstName === '' ? <strong>Hey!&nbsp;</strong> : <strong>Hey {firstName}!&nbsp; </strong>;

const textPrompt = searchState.customPlaceholder ? (
<Styled.TextPrompt>
Expand All @@ -51,7 +46,10 @@ const Searchbar = (props = {}) => {
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
...placeholderWidth,
}}
width={{
_: '225px',
sm: '400px',
}}
>
{searchState.customPlaceholder}
Expand All @@ -67,7 +65,10 @@ const Searchbar = (props = {}) => {
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
...placeholderWidth,
}}
width={{
_: '225px',
sm: '400px',
}}
>
What are you looking for?
Expand Down

0 comments on commit 96a8164

Please sign in to comment.