Skip to content

Commit 1225226

Browse files
fix: fix ui console warnings (#601)
* fix: fix ui console warnings * fix: fix formatting in wrapper file * fix: fix formatting in wrapper file
1 parent 2411ce4 commit 1225226

File tree

5 files changed

+37
-33
lines changed

5 files changed

+37
-33
lines changed

admin/src/pages/HomePage/components/NavigationItemForm/components/AdditionalFields/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const AdditionalFields = () => {
2323
return (
2424
<>
2525
<Grid.Root gap={5} paddingTop={1} paddingBottom={1}>
26-
<Grid.Item col={12} lg={12}>
26+
<Grid.Item col={12}>
2727
<Divider width="100%" />
2828
</Grid.Item>
2929
</Grid.Root>
@@ -36,7 +36,7 @@ export const AdditionalFields = () => {
3636
</Grid.Root>
3737

3838
<Grid.Root gap={5} paddingTop={1} paddingBottom={1}>
39-
<Grid.Item col={12} lg={12}>
39+
<Grid.Item col={12}>
4040
<Divider width="100%" />
4141
</Grid.Item>
4242
</Grid.Root>

admin/src/pages/HomePage/components/NavigationItemForm/components/PathField/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const PathField: React.FC<PathFieldProps> = ({
7171
onChange={(eventOrPath: FormChangeEvent, value?: any) =>
7272
handleChange(eventOrPath, value, onChange)
7373
}
74-
value={values.type === 'EXTERNAL' ? values.externalPath : values.path}
74+
value={(values.type === 'EXTERNAL' ? values.externalPath : values.path) || ''}
7575
width="100%"
7676
/>
7777
</Field>

admin/src/pages/HomePage/components/NavigationItemForm/components/TitleField/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const TitleField = () => {
2727
onChange={(eventOrPath: FormChangeEvent, value?: any) =>
2828
handleChange(eventOrPath, value, onChange)
2929
}
30-
value={values.title}
30+
value={values.title || ''}
3131
/>
3232
</Field>
3333
</Grid.Item>

admin/src/pages/HomePage/components/NavigationItemListItem/ItemCardBadge/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { Badge } from '@strapi/design-system';
22
import styled from 'styled-components';
33

4-
export const ItemCardBadge = styled(Badge)`
4+
export const ItemCardBadge = styled(Badge).withConfig({
5+
shouldForwardProp: (prop) => !['small'].includes(prop),
6+
})`
57
border: 1px solid ${({ theme, borderColor }) => theme.colors[borderColor]};
68
79
${({ small, theme }) =>
Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import styled from 'styled-components';
22

3-
const Wrapper = styled.div<{
3+
const Wrapper = styled.div.withConfig({
4+
shouldForwardProp: (prop) => !['level', 'isLast'].includes(prop),
5+
})<{
46
level?: number;
57
isLast?: boolean;
68
}>`
@@ -11,34 +13,34 @@ const Wrapper = styled.div<{
1113
${({ level, theme, isLast }) =>
1214
level &&
1315
`
14-
&::before {
15-
${!isLast && 'content: "";'}
16-
display: block;
17-
top: ${theme.spaces[1]};
18-
left: -24px;
19-
position: absolute;
20-
height: calc(100% + ${theme.spaces[2]});
21-
width: 19px;
22-
border: 0px solid transparent;
23-
border-left: 4px solid ${theme.colors.neutral300};
24-
}
16+
&::before {
17+
${!isLast && 'content: "";'}
18+
display: block;
19+
top: ${theme.spaces[1]};
20+
left: -24px;
21+
position: absolute;
22+
height: calc(100% + ${theme.spaces[2]});
23+
width: 19px;
24+
border: 0px solid transparent;
25+
border-left: 4px solid ${theme.colors.neutral300};
26+
}
2527
26-
&::after {
27-
content: "";
28-
display: block;
29-
height: 22px;
30-
width: 19px;
31-
position: absolute;
32-
top: ${theme.spaces[1]};
33-
left: -${theme.spaces[6]};
34-
35-
background: transparent;
36-
border: 4px solid ${theme.colors.neutral300};
37-
border-top: transparent;
38-
border-right: transparent;
39-
border-radius: 0 0 0 100%;
40-
}
41-
`};
28+
&::after {
29+
content: "";
30+
display: block;
31+
height: 22px;
32+
width: 19px;
33+
position: absolute;
34+
top: ${theme.spaces[1]};
35+
left: -${theme.spaces[6]};
36+
37+
background: transparent;
38+
border: 4px solid ${theme.colors.neutral300};
39+
border-top: transparent;
40+
border-right: transparent;
41+
border-radius: 0 0 0 100%;
42+
}
43+
`};
4244
`;
4345

4446
export default Wrapper;

0 commit comments

Comments
 (0)