basics.ex 418 B

1234567891011121314151617181920212223242526
  1. defmodule CvGenView.Basics do
  2. use Phoenix.Component
  3. attr(:name, :string, required: true)
  4. attr(:title, :string, required: true)
  5. def basics(assigns) do
  6. ~H"""
  7. <h1><%= @name %></h1>
  8. <h2><%= @title %></h2>
  9. """
  10. end
  11. def css(),
  12. do: """
  13. #basics {
  14. display: grid;
  15. justify-items: center;
  16. }
  17. #basics>h1,
  18. #basics>h2 {
  19. text-transform: uppercase;
  20. }
  21. """
  22. end