Skip to content

Introduce CallToActionButton component and implement it in views that need it#1025

Merged
kdembler merged 7 commits intoJoystream:video-content-pagesfrom
rafalpawlow:1010-cta-buttons
Jul 28, 2021
Merged

Introduce CallToActionButton component and implement it in views that need it#1025
kdembler merged 7 commits intoJoystream:video-content-pagesfrom
rafalpawlow:1010-cta-buttons

Conversation

@rafalpawlow
Copy link
Copy Markdown
Contributor

@rafalpawlow rafalpawlow commented Jul 21, 2021

Closes #1010

@rafalpawlow
Copy link
Copy Markdown
Contributor Author

Copy link
Copy Markdown
Contributor

@drillprop drillprop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small things. Looks really cool btw!

const linkProps = getLinkPropsFromTo(to)

return (
<StyledContainer {...linkProps} onClick={onClick} colorVariant={colorVariant}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
To fix this you could use shouldForwardProp like I did https://github.com/Joystream/atlas/pull/1016/files

icon?: ReactNode
colorVariant?: ColorVariants
label: string
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we should create another file just to add these types. We could just keep them inside CallToActionButton.tsx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, could make sense for bigger component I think

icon?: ReactNode
colorVariant?: ColorVariants
label: string
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, could make sense for bigger component I think

Comment on lines +20 to +21
label="Browse channels"
to={absoluteRoutes.viewer.browseChannels()}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this use the /channels we have currently for now?

@kdembler kdembler merged commit 2038eb6 into Joystream:video-content-pages Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants