Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

feat(features/cards): card with grid and icon-flag #46

Merged
merged 11 commits into from
Apr 3, 2019

Conversation

avetalia
Copy link
Contributor

Card-item with grid and icon. There is no popup here. Need to check up and add popup later.

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)
Copy link
Member

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={() => {
Copy link
Member

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} />
Copy link
Member

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>
{" "}
Copy link
Member

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;
}
Copy link
Member

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 {
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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 }) => {
Copy link
Member

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) => {
Copy link
Member

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

Copy link
Contributor Author

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.

@sergeysova
Copy link
Member

@meowsun Thank you!

@sergeysova sergeysova merged commit 3973b13 into dev Apr 3, 2019
@sergeysova sergeysova deleted the feat/card-item-component-with-grids branch April 3, 2019 16:34
@sergeysova
Copy link
Member

@all-contributors please add @meowsun for code

@allcontributors
Copy link
Contributor

@sergeysova

I've put up a pull request to add @meowsun! 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants