Skip to content

Commit

Permalink
feat(app-board): add estimation hover effect to see entire text
Browse files Browse the repository at this point in the history
  • Loading branch information
rams23 committed Feb 24, 2021
1 parent 1aa7cc2 commit 8e43904
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ const estimationWrapperDefinition = keyframes`
}
`;

export const EstimationWrapper = styled(Box)<{ state: 'opening' | 'open' | 'closed' | 'closing'; moving: boolean }>`
export const EstimationWrapper = styled(Box)<{
state: 'opening' | 'open' | 'closed' | 'closing';
moving: boolean;
chars: number;
}>`
position: absolute;
top: -50px;
left: 0;
Expand Down Expand Up @@ -61,7 +65,12 @@ export const EstimationWrapper = styled(Box)<{ state: 'opening' | 'open' | 'clos
top: 12px;
height: 32px;
width: 80px;
min-width: 80px;
border-radius: 10px 20px 20px 10px;
transition: width 0.5s ease-in-out;
:hover {
width: ${props.chars + 1}ch;
}
`}
${props =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ const EstimationEditor: React.FC<Props> = ({
}, []);

return (
<EstimationWrapper state={state} moving={moving}>
<EstimationWrapper state={state} moving={moving} chars={estimation ? estimation.length : 0}>
<EstimationInputContainer state={state}>
<form onSubmit={submit}>
<EstimationInput
state={state}
ref={inputRef}
maxLength={20}
WrapperComponent={EstimationInputWrapper}
value={estimation}
onChange={onChange}
Expand Down

0 comments on commit 8e43904

Please sign in to comment.