README.md in ariadne_view_components-0.0.3 vs README.md in ariadne_view_components-0.0.4
- old
+ new
@@ -16,15 +16,16 @@
```ruby
<%= render(Ariadne::HeadingComponent.new(tag: :h1)) { "H1 Text" } %>
```
```ruby
- def initialize(tag: nil, classes: "", options:)
- @system_arguments = system_arguments
- @system_arguments[:tag] = tag
-
- @system_arguments[:classes] = class_names(*TAG_TO_CLASSES[tag], system_arguments[:classes])
- )
+DEFAULT_TAG = :div
+DEFAULT_CLASSES = "bg-yellow-400"
+ def initialize(tag: DEFAULT_TAG, classes: "", attributes: {})
+ @tag = check_incoming_tag(DEFAULT_TAG, tag)
+ @classes = class_names(DEFAULT_CLASSES, classes)
+ @attributes = attributes
+ @attributes[:id] = "myId"
end
```
document schemes, fetch_or_raise, all that