mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 00:39:49 +00:00
FolderCardBodyAction feedback fix
This commit is contained in:
parent
6413373770
commit
2d1fd4b295
@ -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 = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user