Skip to content

Commit 063f8aa

Browse files
fix(LayoutItem): simplify controls layout
1 parent e582db6 commit 063f8aa

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/sub-blocks/LayoutItem/LayoutItem.tsx

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, {Fragment, useMemo} from 'react';
1+
import React, {useMemo} from 'react';
22

33
import {useUniqId} from '@gravity-ui/uikit';
44

@@ -66,16 +66,11 @@ const LayoutItem = ({
6666
<Content {...contentProps} titleId={titleId} />
6767
</IconWrapper>
6868
</div>
69-
{areControlsInFooter && (links || buttons) && (
70-
<Fragment>
71-
<Links className={b('links')} size="s" links={links} titleId={titleId} />
72-
<Buttons
73-
className={b('buttons')}
74-
size="s"
75-
buttons={buttons}
76-
titleId={titleId}
77-
/>
78-
</Fragment>
69+
{areControlsInFooter && links && (
70+
<Links className={b('links')} size="s" links={links} titleId={titleId} />
71+
)}
72+
{areControlsInFooter && buttons && (
73+
<Buttons className={b('buttons')} size="s" buttons={buttons} titleId={titleId} />
7974
)}
8075
</div>
8176
);

0 commit comments

Comments
 (0)