Skip to content

Commit

Permalink
fix(GoalForm): sync tags container background
Browse files Browse the repository at this point in the history
  • Loading branch information
awinogradov committed Feb 28, 2023
1 parent 3de2663 commit 5c0f17c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/components/GoalForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,15 @@ interface GoalFormProps {
onSumbit: (fields: GoalFormType) => void;
}

const StyledTagsContainer = styled.div`
padding-top: 50px;
const StyledTagsContainer = styled.div<{ focused?: boolean }>`
padding-top: 45px;
padding-left: ${gapS};
background-color: ${gray2};
${({ focused }) =>
focused &&
`
background-color: ${gray2};
`}
`;

export const GoalForm: React.FC<GoalFormProps> = ({
Expand Down Expand Up @@ -220,7 +225,7 @@ export const GoalForm: React.FC<GoalFormProps> = ({
)}
/>

<StyledTagsContainer>
<StyledTagsContainer focused={descriptionFocused}>
{tagsWatcher?.map((tag) => (
<Tag key={tag.id} title={tag.title} onHide={onTagDeleteProvider(tag)} />
))}
Expand Down Expand Up @@ -274,7 +279,6 @@ export const GoalForm: React.FC<GoalFormProps> = ({
control={control}
render={({ field }) => (
<EstimateComboBox
text={t('Schedule')}
placeholder={t('Date input mask placeholder')}
mask={t('Date input mask')}
defaultValuePlaceholder={estimate ?? estimatedMeta({ locale })}
Expand Down Expand Up @@ -304,7 +308,6 @@ export const GoalForm: React.FC<GoalFormProps> = ({
control={control}
render={({ field }) => (
<TagComboBox
text="Tags"
disabled={busy || (tagsWatcher || []).length >= tagsLimit}
placeholder={t('Enter tag title')}
error={errorsResolver(field.name)}
Expand Down

0 comments on commit 5c0f17c

Please sign in to comment.