mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
adjust searchInput to match button width
This commit is contained in:
@@ -76,13 +76,14 @@ export const SearchInput = ({
|
|||||||
|
|
||||||
const hasValue = props.value || ref.current?.value;
|
const hasValue = props.value || ref.current?.value;
|
||||||
const shouldShowInput = isInputMode || hasValue;
|
const shouldShowInput = isInputMode || hasValue;
|
||||||
|
const shouldExpand = isInputMode || hasValue;
|
||||||
|
|
||||||
const containerStyle: CSSProperties = {
|
const containerStyle: CSSProperties = {
|
||||||
display: 'inline-flex',
|
display: 'inline-flex',
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
transition: 'width 0.3s ease-in-out',
|
transition: 'width 0.3s ease-in-out',
|
||||||
width: shouldShowInput ? '200px' : '40px',
|
width: shouldExpand ? '200px' : '36px',
|
||||||
};
|
};
|
||||||
|
|
||||||
const buttonStyle: CSSProperties = {
|
const buttonStyle: CSSProperties = {
|
||||||
|
|||||||
Reference in New Issue
Block a user