Packages

A set of simple Surface components based on ant-design.

Current section

Files

Jump to
live_antd lib components space.ex
Raw

lib/components/space.ex

defmodule LiveAntd.Components.Space do
@moduledoc """
相邻组件的布局工具,
比如两个按钮之间的间隔,自动化处理。
"""
use Surface.Component
def render(assigns) do
~H"""
<div class="ant-space ant-space-horizaontal">
<slot />
</div>
"""
end
end
defmodule LiveAntd.Components.SpaceItem do
@moduledoc """
space item
"""
use Surface.Component
def render(assigns) do
~H"""
<div class="ant-space-item" style="padding-right: 10px;">
<slot />
</div>
"""
end
end