Skip to content

Commit 22f550a

Browse files
committed
feat: add small transition on hide/show component
1 parent 856e5fe commit 22f550a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

frontend/web/components/pages/project-settings/tabs/GeneralTab/FeatureNameValidation.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,13 @@ export const FeatureNameValidation = ({
7979
onChange={onToggle}
8080
checked={featureRegexEnabled}
8181
/>
82-
{featureRegexEnabled && (
82+
<div
83+
style={{
84+
height: featureRegexEnabled ? 'auto' : 0,
85+
opacity: featureRegexEnabled ? 1 : 0,
86+
transition: 'opacity 0.4s ease-in-out, height 0.4s ease-in-out',
87+
}}
88+
>
8389
<InputGroup
8490
title='Feature Name RegEx'
8591
component={
@@ -116,7 +122,7 @@ export const FeatureNameValidation = ({
116122
</form>
117123
}
118124
/>
119-
)}
125+
</div>
120126
</FormGroup>
121127
)
122128
}

0 commit comments

Comments
 (0)