Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI search bar height is going to be change by just writing a some text && text hide under the search button #1913

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions src/components/App/UniverseQuestion/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export const UniverseQuestion = () => {
Ideas have shapes
<TextAreaWrapper onKeyDown={onEnterPress} py={12} tabIndex={-1}>
<StyledTextarea
hasText={!!question.trim()}
onChange={(e) => setQuestion(e.target.value)}
placeholder="What do you want to know?"
value={question}
Expand Down Expand Up @@ -109,17 +108,15 @@ export const UniverseQuestion = () => {
}

const StyledTextarea = styled(TextareaAutosize).attrs({
minRows: 5,
})<{ hasText: boolean }>`
maxRows: 3,
})`
background: ${colors.BG1};
max-width: 702px;
width: 702px;
max-width: 700px;
width: 700px;
color: ${colors.white};
padding: 16px;
padding-bottom: ${(props) => (props.hasText ? '50px' : '16px')};
max-height: 200px;
padding: 15px;
overflow-y: auto !important;
border: 1px solid ${colors.modalShield};
border: none;
resize: none;
outline: none;
border-radius: 12px;
Expand All @@ -129,7 +126,6 @@ const StyledTextarea = styled(TextareaAutosize).attrs({
text-align: justify;
font-size: 16px;
font-weight: 400;
box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.5);

&:-moz-placeholder, /* Firefox 18- */
&::-moz-placeholder, /* Firefox 19+ */
Expand All @@ -153,6 +149,16 @@ const StyledTextarea = styled(TextareaAutosize).attrs({
const TextAreaWrapper = styled(Flex)`
position: relative;
margin-top: 30px;
background: ${colors.BG1};
max-width: 702px;
width: 702px;
color: ${colors.white};
min-height: 150px;
border: 1px solid ${colors.modalShield};
resize: none;
outline: none;
border-radius: 12px;
box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.5);
`

const Wrapper = styled(Flex)`
Expand All @@ -175,7 +181,7 @@ const Wrapper = styled(Flex)`
const StyledButton = styled(Button)`
&& {
position: absolute;
bottom: 26px;
bottom: 12px;
right: 14px;
height: 32px;
border-radius: 16px;
Expand Down
Loading