Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhamp authored Jan 21, 2024
1 parent 63c45d7 commit a96edb4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,13 @@ Themes are simple classes that implement the
[`Theme` interface](https://github.com/simonhamp/the-og/blob/main/src/Interfaces/Theme.php).

However, you can create your own theme most easily by simply instantiating the
[`Theme` class](https://github.com/simonhamp/the-og/blob/main/src/Theme/Theme.php).

You can even do this with an anonymous class to save creating a whole new file:
[`Theme` class](https://github.com/simonhamp/the-og/blob/main/src/Theme/Theme.php):

```php
use SimonHamp\TheOg\Theme\Fonts\Inter;
use SimonHamp\TheOg\Theme\Theme;

$theme = new class(
$theme = new Theme(
accentColor: '#247BA0',
backgroundColor: '#ECEBE4',
baseColor: '#153B50',
Expand All @@ -216,7 +214,7 @@ $theme = new class(
descriptionColor: '#429EA6',
descriptionFont: Inter::light(),
titleFont: Inter::black(),
) extends Theme {};
);

$image = new Image;
$image->theme($theme);
Expand Down

0 comments on commit a96edb4

Please sign in to comment.