LiveAntd(WIP)
A set of simple Surface components based on ant-design.
Table of contents
Getting started
-
The package can be installed by adding
live_antdto your list of dependencies inmix.exs:
def deps do
[
{:live_antd, github: "hc360-elixir/live_antd"}
]
end-
add the view support to
app_web.ex
def view do
quote do
# ... existing config
# Include shared imports and aliases for views
unquote(view_helpers())
# live_antd
use LiveAntd, :view
end
end- set up live_view file to enabled component.
defmodule DummyWeb.PageLive do
use DummyWeb, :live_view
#... existing code
use LiveAntd, :live_view
alias LiveAntd.Components.Button
def render() do
~H"""
<Button
type="primary"
size="middle"
>
Hello LiveAntd
</Button>
"""
end
endTODO's
Demo
The dummy app shows a simple live_antd example.
Clone the repository.
https://github.com/hc360-elixir/live_antdChange directory
$ cd dummyRun mix
$ mix deps.get && yarn --cwd=assetsStart the Phoenix server
$ mix phx.server
Open your browser, and visit http://localhost:4000
Contributing
Bug report or pull request are welcome.
Make a pull request
- Fork it
-
Create your feature branch (
git checkout -b feat/my-new-feature) -
Commit your changes (
git commit -am 'Add some feature') -
Push to the branch (
git push origin feat/my-new-feature) - Create new Pull Request
Please write unit test with your code if necessary.
License
The gem is available as open source under the terms of the MIT License.