mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 08:52:26 +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 PropTypes from 'prop-types';
|
||||||
import { NavLink } from 'react-router-dom';
|
import { NavLink } from 'react-router-dom';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
import { Box } from '@strapi/design-system/Box';
|
||||||
|
|
||||||
const FolderCardLink = styled(NavLink)`
|
const BoxTextDecoration = styled(Box)`
|
||||||
max-width: 100%;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const FolderCardBodyAction = ({ to, ...props }) => {
|
export const FolderCardBodyAction = ({ to, ...props }) => {
|
||||||
if (to) {
|
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 = {
|
FolderCardBodyAction.defaultProps = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user