Skip to content

Commit

Permalink
add default styles for Devise OTP to apply max width and centering to…
Browse files Browse the repository at this point in the history
… QR Code; update README and test app for change;
  • Loading branch information
strouptl committed Sep 21, 2024
1 parent 0adc8ff commit 0258c88
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ Don't forget to migrate:

rake db:migrate

### Default CSS

To use the default CSS for devise-otp, just require the devise-otp.css file as usual in your application.css file (or equivalent):

*= require devise-otp

### Custom views

If you want to customise your views, you can use the following generator to eject the default view files:
Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/devise-otp.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.qrcode-container {
max-width: 300px;
margin: 0 auto;
}
1 change: 1 addition & 0 deletions test/dummy/app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require devise-otp
*= require_self
*= require_tree .
*/

0 comments on commit 0258c88

Please sign in to comment.