-
-
Notifications
You must be signed in to change notification settings - Fork 23
feat(features/cards): card with grid and icon-flag #46
Conversation
a bit redesigned popup with grids added into card-item
added a bit redesigned with grids popup into card-item
} | ||
|
||
const FlagToggler = ({ isUseful, onUsefulClick }) => { | ||
// const [isUseful, setIsUseful] = useState(usefulFor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, remove old code in comments
|
||
return ( | ||
<IconWrapper | ||
onClick={() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<IconWrapper onClick={onUsefulClick}>
{card.meta.canEdit && <Link to={`/edit/${card.id}`}>Edit</Link>} | ||
<i>{format(new Date(card.createdAt), "HH:MM MM/DD/YYYY")}</i> | ||
<PopUpDelete title={card.title} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe pass whole card
?
<CardDeletePopupButton card={card} />
(just example)
const CardInfo = (card) => ( | ||
<Row> | ||
<Text small> | ||
{" "} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you need {" "}
here?
Can you add "space" with css/layout?
` | ||
const IconWrapper = styled.div` | ||
padding: 0 0.6rem; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra }
?
opacity: 0.3; | ||
} | ||
|
||
& #icon:hover { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, don't use id selectors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to fix/change work with svg in another branch/pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe fix in that?
flex-shrink: 0; | ||
line-height: 2.4rem; | ||
` | ||
const PopUpDelete = ({ title }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, reuse that code from #45
// When you need more icons just add svg-path in getIconPath and call it | ||
// with <Icon name="yourname" /> | ||
|
||
const getIconPath = (name, props) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use svg-react-loader
to load real .svg icons to react
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not satisfied with a way Icon component works now, especially hovers. I am going to fix/change work with svg in another branch/pr.
ZeroButton instead of clickable div with trash-icon
@meowsun Thank you! |
@all-contributors please add @meowsun for code |
I've put up a pull request to add @meowsun! 🎉 |
Card-item with grid and icon. There is no popup here. Need to check up and add popup later.