Skip to content

Commit

Permalink
Merge pull request #31 from azriel91/feature/mobile-styling-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
azriel91 authored Aug 7, 2024
2 parents ef71c61 + 370c10c commit 81c6d32
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crate/web_components/src/dot_svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ pub fn DotSvg(
onclick=SVG_WRITE_TO_CLIPBOARD
class=format!("
{button_tw_classes}
top-2
-top-6
right-8
")
value="📄"
Expand Down Expand Up @@ -428,7 +428,7 @@ pub fn DotSvg(
}}
class=format!("
{button_tw_classes}
top-2
-top-6
right-2
")
value="↗️"
Expand Down
36 changes: 33 additions & 3 deletions playground/src/app/info_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ pub fn InfoGraph(diagram_only: ReadSignal<bool>) -> impl IntoView {
let editor_and_diagram_div_classes = move || {
if diagram_only.get() {
"
text-sm \
lg:text-base \
basis-auto \
grow \
\
Expand All @@ -202,6 +204,8 @@ pub fn InfoGraph(diagram_only: ReadSignal<bool>) -> impl IntoView {
"
} else {
"\
text-sm \
lg:text-base \
basis-auto \
grow \
\
Expand Down Expand Up @@ -424,10 +428,33 @@ pub fn InfoGraphSrcAndDotSrc(
label="generated.dot"
/>

<div class="float-right flex gap-x-2 px-2">
<label for="">"Source:"</label>
<div class="
float-right \
flex \
gap-x-2 \
justify-end \
items-center \
h-7 \
lg:h-9 \
pr-1 \
lg:pr-2 \
max-w-[40%] \
lg:max-w-none \
">
<label class="" for="src_selection">"Source:"</label>
<select
class="border border-slate-400 rounded focus:ring-2 focus:ring-blue-500"
name="src_selection"
class="\
border \
border-slate-400 \
rounded \
focus:ring-2 \
focus:ring-blue-500 \
max-w-[60%] \
lg:max-w-none \
h-5 \
lg:h-7 \
"
on:change=move |ev| {
let new_value = event_target_value(&ev);
src_selection_set.set(new_value);
Expand All @@ -450,6 +477,7 @@ pub fn InfoGraphSrcAndDotSrc(
// tab content
<div class="\
invisible \
clear-both \
h-0 \
peer-checked/tab_info_graph_yml:visible \
peer-checked/tab_info_graph_yml:h-full \
Expand Down Expand Up @@ -477,6 +505,7 @@ pub fn InfoGraphSrcAndDotSrc(
// tab content
<div class="\
invisible \
clear-both \
h-0 \
peer-checked/tab_info_graph_dot:visible \
peer-checked/tab_info_graph_dot:h-full \
Expand Down Expand Up @@ -567,6 +596,7 @@ pub fn InfoGraphDiagram(
lg:w-auto \
max-w-dvw \
overflow-auto \
touch-pinch-zoom \
"
>
<DotSvg
Expand Down
3 changes: 2 additions & 1 deletion playground/src/app/tabs/tab_label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ pub fn TabLabel(
{class} \
\
inline-block \
h-9 \
h-7 \
lg:h-9 \
px-2.5 \
\
cursor-pointer \
Expand Down

0 comments on commit 81c6d32

Please sign in to comment.