allenai / pdf-component-library

44 stars 4 forks source link

30580 Library components: Zoom In/Out Buttons #82

Closed carolinepaulic closed 2 years ago

carolinepaulic commented 2 years ago

Description

Ticket #30580 which is a subtask of #30371.

Changes in this PR:

Testing Plan

Tested demo app locally: zoom in/out with rotation

Output / Screenshots

carolinepaulic commented 2 years ago

It might be a good idea if the zoom buttons can use customized icons or svgs in case Semantic Reader has any design changes in future. Other things look great!

Great idea. I updated the zoom button components to accept optional children that will be displayed instead of the -/+ when passed. So S2 can pass an <Icon> as the child to show whatever we want for the buttons.

yensung commented 2 years ago

Ahh one last thing: the <button> tag looks more suitable for the zoom buttons since they are not for directing users to somewhere (though href is not defined).