Commit
•
2893bb5
1
Parent(s):
157d2d3
docs: `loading_message` doc, attributes, and story
Browse files
lib/medical_transcription_web/components/components.ex
CHANGED
@@ -48,6 +48,11 @@ defmodule MedicalTranscriptionWeb.Components do
|
|
48 |
"""
|
49 |
end
|
50 |
|
|
|
|
|
|
|
|
|
|
|
51 |
def loading_message(assigns) do
|
52 |
~H"""
|
53 |
<%= if @visible do %>
|
|
|
48 |
"""
|
49 |
end
|
50 |
|
51 |
+
attr :visible, :boolean, required: true
|
52 |
+
|
53 |
+
@doc """
|
54 |
+
A loading icon and message displayed while the audio is being processed.
|
55 |
+
"""
|
56 |
def loading_message(assigns) do
|
57 |
~H"""
|
58 |
<%= if @visible do %>
|
storybook/components/loading_message.story.exs
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
defmodule MedicalTranscriptionWeb.Storybook.LoadingMessage do
|
2 |
+
use PhoenixStorybook.Story, :component
|
3 |
+
|
4 |
+
def function, do: &MedicalTranscriptionWeb.Components.loading_message/1
|
5 |
+
|
6 |
+
def variations do
|
7 |
+
[
|
8 |
+
%Variation{
|
9 |
+
id: :default,
|
10 |
+
attributes: %{
|
11 |
+
visible: true
|
12 |
+
}
|
13 |
+
}
|
14 |
+
]
|
15 |
+
end
|
16 |
+
end
|