Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(react): clickable link to document download #1319

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

vanbasten17
Copy link
Contributor

Description

  • Use a clickable button instead of previewing a document.
  • Leave them customizable:
// Plain props
 documentDownload: {
      text: 'Descarregar',
      style: {
        color: 'black',
      },
    },
// function
    documentDownload: from => {
      return {
        text: `Descarregar`,
        style: { color: from === 'user' ? 'black' : 'blue' },
      }
    },

Screenshot 2021-02-15 at 19 35 24

Screenshot 2021-02-15 at 19 35 32

@vanbasten17 vanbasten17 changed the title chore(react): give clickable link to document download chore(react): clickable link to document download Feb 16, 2021
@codecov
Copy link

codecov bot commented Feb 16, 2021

Codecov Report

Merging #1319 (0aa34f6) into master (62050f7) will decrease coverage by 0.02%.
The diff coverage is 37.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1319      +/-   ##
==========================================
- Coverage   60.92%   60.89%   -0.03%     
==========================================
  Files         247      247              
  Lines        7083     7089       +6     
  Branches     1195     1197       +2     
==========================================
+ Hits         4315     4317       +2     
- Misses       2442     2445       +3     
- Partials      326      327       +1     
Flag Coverage Δ
botonic-react 58.20% <37.50%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/botonic-react/src/components/document.jsx 64.28% <37.50%> (-23.22%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62050f7...0aa34f6. Read the comment docs.

Copy link
Contributor

@asastre asastre left a comment

Choose a reason for hiding this comment

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

Nice! 👏

@vanbasten17 vanbasten17 merged commit 7d95903 into master Feb 17, 2021
@vanbasten17 vanbasten17 deleted the fix/media-issues branch February 17, 2021 11:09
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.

3 participants