FolderCardBodyAction feedback fix

This commit is contained in:
ronronscelestes 2022-05-24 13:23:35 +02:00
parent 6413373770
commit 2d1fd4b295

View File

@ -2,18 +2,18 @@ import React from 'react';
import PropTypes from 'prop-types';
import { NavLink } from 'react-router-dom';
import styled from 'styled-components';
import { Box } from '@strapi/design-system/Box';
const FolderCardLink = styled(NavLink)`
max-width: 100%;
const BoxTextDecoration = styled(Box)`
text-decoration: none;
`;
export const FolderCardBodyAction = ({ to, ...props }) => {
if (to) {
return <FolderCardLink to={to} {...props} />;
return <BoxTextDecoration as={NavLink} maxWidth="100%" to={to} {...props} />;
}
return <button type="button" {...props} />;
return <Box as="button" type="button" maxWidth="100%" {...props} />;
};
FolderCardBodyAction.defaultProps = {