VH
Size: a a a
VH
A

IV
:root {
--bg-color-white: #FFFFFF;
--bg-color-grey: #F5F7FA;
--bg-color-black: #000000;VH
VH
A

A

A
VH
VH
VH
VH
a
Possible iteration over unexpected (custom / inherited) members, probably missing hasOwnProperty check), ели я не проверю есть ли такое свойство, как я сделал в первом (также слышал и раньше что так не желательно делать), даже придумать не могу как его может не быть если я перечисляю свойства этого-же объектаobj[prop] отличается от obj.prop в целом?a
A
const RenderAppList = ({ list }) => {
return (
<CustomTable
margin="1rem 0 0 0"
cellWidth="300px"
cellPadding="10px 20px"
aria-label="My Applications"
>
<thead>
<tr>
<CustomTableCell align="right" scope="col">
Name
</CustomTableCell>
<CustomTableCell scope="col">URL/Domain</CustomTableCell>
</tr>
</thead>
<tbody>
{list.map((elem) => {
const { id, name, homeUrl } = elem;
return (
<tr key={id}>
<CustomTableCell align="left">
<StyledLink to={`applications/${id}`}>{name}</StyledLink>
</CustomTableCell>
<td>
<StyledLink to={`applications/${id}`}>{homeUrl}</StyledLink>
</td>
</tr>
);
})}
</tbody>
</CustomTable>
);
};A
export const CustomTable = styled.table`
margin: ${(props) => props.margin || 'none'};
border-spacing: 0px 0px;
border-collapse: collapse;
width: 100%;
thead tr {
border-bottom: 3px solid rgba(240, 240, 240, 0.5);
}
tbody tr:hover {
background-color: rgba(240, 240, 240, 0.5);
}
th,
td {
width: ${(props) => props.cellWidth || '300px'};
padding: ${(props) => props.cellPadding || 0};
}
th {
font-size: 1.125rem;
}
td {
font-size: 1rem;
}
`;
export const CustomTableCell = styled.td`
${CustomTable} & {
text-align: ${(props) => props.align || 'center'};
}
padding: ${(props) => props.padding || 0};
`;
A

a