Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

QR Code Component using Vite, typescript, and Styled-Components

timDeHof 30

@timDeHof

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Was using typescript too much for a small challenge?

Which areas of my code needs improvements?

What kind of best practices would you use to optimize the design?

Also, any Feedback welcome!

Community feedback

@Iamsanthosh2203

Posted

Hi there , When I visit your site on my computer its scrollable try to make it single page using the height of the //global conatiner// which contains all the //elements// inside... To make it single page use this example :

HTML !!!

<div class="global"> <main>///Your contents in here</main> </div>

CSS !!! .global{ display:flex; height:100vh; justify-content:center; align-items:center; }

This code will center the items to the middle of the screen

Marked as helpful

1

timDeHof 30

@timDeHof

Posted

@Iamsanthosh2203 Thanks, I have made the necessary changes to the global styles for styled components.

0

@istealersn-dev

Posted

Great efforts, especially using Typescript and styled components. With a bit of tweaks and fixes, you should be able to make it accessible and optimized to the best

  • Building a good HTML semantics for a better structure to the content while you build app using react/typescript is a must
  • You could have avoided the extra <div> by using React.Fragments or <> in your card component
  • To simply center card component, you can also use display: grid; place-content: center;
  • You have set fixed width for few elements, avoid setting fixed width, you should let it scale based on the content + padding, this supports responsive behavior and easy to implement
  • Lastly your final build of the application will also include the long list of styles from theme.ts which I think is not necessary (could be optimized)

Hope this is helpful, keep coding!!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord