README.md

# LiveAntd(WIP)

A set of simple [Surface](https://github.com/msaraiva/surface) components based on [ant-design](https://ant.design/).

## Table of contents

* [Getting started](#getting-started)
* [Examples](#examples)
* [Features](#features)
* [TODO's](#todo)
* [Demo](#demo)
* [Contributing](#contributing)
* [Make a pull request](#make-a-pull-request)
* [License](#license)

## Getting started

* The package can be installed by adding `live_antd` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [
    {:live_antd, github: "hc360-elixir/live_antd"}
  ]
end
```

* add the view support to `app_web.ex`

```elixir
  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.

```elixir
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
end
```

## TODO's

[See](./lib/components/README.md)

## Demo

The dummy app shows a simple live_antd example.

Clone the repository.

```bash
https://github.com/hc360-elixir/live_antd
```

Change directory

```bash
$ cd dummy
```

Run mix

```bash
$ mix deps.get && yarn --cwd=assets
```

Start the Phoenix server

```bash
$ mix phx.server
```

Open your browser, and visit `http://localhost:4000`

## Contributing

Bug report or pull request are welcome.

### Make a pull request

1. Fork it
2. Create your feature branch (`git checkout -b feat/my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin feat/my-new-feature`)
5. 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](http://opensource.org/licenses/MIT).