Run formatter

This commit is contained in:
Wout De Puysseleir 2023-06-15 12:36:04 -07:00
parent 7df27c86cf
commit fa26e6b0f5
No known key found for this signature in database
GPG key ID: 3DE9371B50FEC46A
6 changed files with 21 additions and 21 deletions

View file

@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added [LiveSvelte Components Macro](https://github.com/woutdp/live_svelte#the-components-macro) - [PR](https://github.com/woutdp/live_svelte/pull/50)
- Added [LiveSvelte Components Macro](https://github.com/woutdp/live_svelte#the-components-macro) - [PR](https://github.com/woutdp/live_svelte/pull/50)
## [0.7.1] - 2023-06-03
@ -21,18 +21,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added `pushEventTo`
- Added `pushEventTo`
## [0.6.0] - 2023-05-26
### Added
- Install instructions on importing LiveSvelte inside `html_helpers` so `<.svelte />` is possible.
- Install instructions on importing LiveSvelte inside `html_helpers` so `<.svelte />` is possible.
### Changed
- Deprecated `LiveSvelte.render` in favor of `LiveSvelte.svelte`
- Now we're using `<.svelte />` instead of `<LiveSvelte.render />` in the examples
- Deprecated `LiveSvelte.render` in favor of `LiveSvelte.svelte`
- Now we're using `<.svelte />` instead of `<LiveSvelte.render />` in the examples
## [0.5.1] - 2023-05-06

View file

@ -1,6 +1,7 @@
<div align="center">
# LiveSvelte
[![GitHub](https://img.shields.io/github/stars/woutdp/live_svelte?style=social)](https://github.com/woutdp/live_svelte)
[![Hex.pm](https://img.shields.io/hexpm/v/live_svelte.svg)](https://hex.pm/packages/live_svelte)
@ -245,7 +246,6 @@ _Note: that here we use the `pushEvent` function, but you could also use `phx-cl
_`pushEventTo` is available too and works exactly the same way as specified in the [documentation](https://hexdocs.pm/phoenix_live_view/js-interop.html#client-hooks-via-phx-hook)._
#### Create a LiveView
```elixir

View file

@ -26,8 +26,8 @@ import {getHooks} from "live_svelte"
import * as SvelteComponents from "../svelte/**/*"
const Hooks = {
...createLiveJsonHooks(),
...getHooks(SvelteComponents)
...createLiveJsonHooks(),
...getHooks(SvelteComponents),
}
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")

View file

@ -1,17 +1,17 @@
<script>
export let big_data_set = {}
export let big_data_set
</script>
<h1 class="text-lg">LiveJson demo</h1>
<p class="mb-2">Check the websocket to see how much data is being transferred.</p>
<ul>
<li>
Key Length: {Object.keys(big_data_set).length}
</li>
<li>
Rough byte size: {JSON.stringify(big_data_set).length}
</li>
<li>
Key Length: {Object.keys(big_data_set).length}
</li>
<li>
Rough byte size: {JSON.stringify(big_data_set).length}
</li>
</ul>
<button phx-click="remove_element" class="bg-black text-white px-4 py-2 rounded">Remove Element</button>

View file

@ -8,7 +8,7 @@ defmodule ExampleWeb.LiveExample6 do
def render(assigns) do
~H"""
<div class="flex justify-center items-center h-full w-full">
<form phx-submit="set_name" :if={!@name}>
<form :if={!@name} phx-submit="set_name">
<!-- svelte-ignore a11y-autofocus -->
<input
type="text"
@ -21,10 +21,10 @@ defmodule ExampleWeb.LiveExample6 do
<button class="py-2 px-4 bg-black text-white rounded">Join</button>
</form>
<.Chat
messages={@messages}
name={@name}
class="w-full h-full flex justify-center items-center"
:if={@name}
:if={@name}
messages={@messages}
name={@name}
class="w-full h-full flex justify-center items-center"
/>
</div>
"""

View file

@ -50,7 +50,7 @@ defmodule Example.MixProject do
{:telemetry_poller, "~> 1.0"},
{:floki, ">= 0.30.0", only: :test},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:tailwind, "~> 0.1.8", runtime: Mix.env() == :dev},
{:tailwind, "~> 0.1.8", runtime: Mix.env() == :dev}
]
end