Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mdwagner committed Oct 16, 2023
1 parent 95ae36e commit 60e9e91
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ class PhoneBehaviorComponent < BaseHXMLComponent
end
```

#### Create Custom Elements

You can create custom elements and attributes with `element` & `attribute` methods respectively.

```crystal
class SwipeRowComponent < BaseHXMLComponent
def render(&)
Expand All @@ -118,6 +122,8 @@ end
mount PhoneBehaviorComponent, phone_number: "123-456-7890"
```

With a block:

```crystal
mount SwipeRowComponent do
# ...
Expand Down

0 comments on commit 60e9e91

Please sign in to comment.