Skip to content

Commit

Permalink
feat: rename getFormatPrice to formatPrice, update Tailwind config, a…
Browse files Browse the repository at this point in the history
…nd adjust base template structure
  • Loading branch information
ErwannRousseau committed Dec 5, 2024
1 parent 93339b7 commit 3c5e4cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Twig/Components/Price.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class Price
public float $price;
public string $locale = 'en_US';

public function getFormatPrice(): string
public function formatPrice(): string
{
$formatter = new NumberFormatter($this->locale, NumberFormatter::CURRENCY);
return $formatter->formatCurrency($this->price, 'USD');
Expand Down
1 change: 0 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: ["class"],
content: [
"./assets/**/*.js",
"./templates/**/*.html.twig",
Expand Down
6 changes: 3 additions & 3 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<meta charset="UTF-8">
<title>Tailwind + Twig Components</title>
<link rel="icon" href="{{ asset('icons/knp.svg') }}">
{% block javascripts %}
{% block importmap %}{{ importmap('app') }}{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('styles/app.css') }}">
{% endblock %}
</head>
<body class="container bg-background min-h-dvh">
<body class="container bg-background min-h-dvh lg">
<main>
{% block body %}{% endblock %}
</main>
Expand Down

0 comments on commit 3c5e4cc

Please sign in to comment.