Skip to content

Commit

Permalink
Added Chart component and bumped version to 0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
georgekettle committed Dec 27, 2023
1 parent 44ecb1b commit 09fa347
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions lib/phlex_ui/chart.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# frozen_string_literal: true

module PhlexUI
class Chart < PhlexUI::Base
def initialize(options: {}, **attrs)
@options = options.to_json
super(**attrs)
end

def template(&)
canvas(**attrs, &)
end

private

def default_attrs
{
data_controller: "chart",
data_chart_options_value: @options
}
end
end
end
Binary file added phlex_ui-0.1.4.gem
Binary file not shown.
2 changes: 1 addition & 1 deletion phlex_ui.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "phlex_ui"
s.version = "0.1.3"
s.version = "0.1.4"
s.summary = "PhlexUI is a UI Component Library for Ruby developers."
s.description = "PhlexUI is a UI Component Library for Ruby developers. Built on top of the Phlex Framework."
s.authors = ["George Kettle"]
Expand Down

0 comments on commit 09fa347

Please sign in to comment.