-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://github.com/bonfire-networks/bonfire-app/issues/1043
- Loading branch information
Showing
8 changed files
with
449 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,70 @@ | ||
defmodule Bonfire.UI.Common.Themes.Default.App.SwiftUI do | ||
use LiveViewNative.Stylesheet, :swiftui | ||
if Bonfire.Common.Extend.module_enabled?(LiveViewNative) do | ||
defmodule Bonfire.UI.Common.Themes.Default.App.SwiftUI do | ||
use LiveViewNative.Stylesheet, :swiftui | ||
|
||
# Add your styles here | ||
# Refer to your client's documentation on what the proper syntax | ||
# is for defining rules within classes | ||
~SHEET""" | ||
""" | ||
# Add your styles here | ||
# Refer to your client's documentation on what the proper syntax | ||
# is for defining rules within classes | ||
~SHEET""" | ||
def class("main_header") do | ||
~RULES""" | ||
toolbar(content: :toolbar) | ||
navigationTitle(:title) | ||
toolbarTitleMenu(content: :content) | ||
navigationBarTitleDisplayMode(.inline) | ||
toolbarBackgroundVisibility(.visible, for: .navigationBar) | ||
toolbarBackground(.ultraThinMaterial, for: .navigationBar) | ||
""" | ||
end | ||
|
||
def class("simple_header") do | ||
~RULES""" | ||
toolbar(content: :toolbar) | ||
navigationTitle(:title) | ||
navigationBarTitleDisplayMode(.inline) | ||
""" | ||
end | ||
def class("main_header") do | ||
~RULES""" | ||
toolbar(content: :toolbar) | ||
navigationTitle(:title) | ||
toolbarTitleMenu(content: :content) | ||
navigationBarTitleDisplayMode(.inline) | ||
toolbarBackgroundVisibility(.visible, for: .navigationBar) | ||
toolbarBackground(.ultraThinMaterial, for: .navigationBar) | ||
""" | ||
end | ||
|
||
def class("detents:" <> props) do | ||
[height, size] = String.split(props, ":") | ||
def class("simple_header") do | ||
~RULES""" | ||
toolbar(content: :toolbar) | ||
navigationTitle(:title) | ||
navigationBarTitleDisplayMode(.inline) | ||
""" | ||
end | ||
|
||
# {height, _} = Integer.parse(height) | ||
def class("detents:" <> props) do | ||
[height, size] = String.split(props, ":") | ||
|
||
~RULES""" | ||
presentationDetents([.{height}, .{size}]) | ||
""" | ||
end | ||
# {height, _} = Integer.parse(height) | ||
|
||
def class("dragindicator:" <> props) do | ||
|
||
~RULES""" | ||
presentationDragIndicator(.{props}) | ||
""" | ||
end | ||
~RULES""" | ||
presentationDetents([.{height}, .{size}]) | ||
""" | ||
end | ||
|
||
def class("dragindicator:" <> props) do | ||
~RULES""" | ||
presentationDragIndicator(.{props}) | ||
""" | ||
end | ||
|
||
def class("ultrathinmaterial") do | ||
~RULES""" | ||
presentationBackground(.ultraThinMaterial) | ||
""" | ||
end | ||
def class("ultrathinmaterial") do | ||
~RULES""" | ||
presentationBackground(.ultraThinMaterial) | ||
""" | ||
end | ||
|
||
# If you need to have greater control over how your style rules are created | ||
# you can use the function defintion style which is more verbose but allows | ||
# for more fine-grained controled | ||
# | ||
# This example shows what is not possible within the more concise ~SHEET | ||
# use `<Text class="frame:w100:h200" />` allows for a setting | ||
# of both the `width` and `height` values. | ||
# If you need to have greater control over how your style rules are created | ||
# you can use the function defintion style which is more verbose but allows | ||
# for more fine-grained controled | ||
# | ||
# This example shows what is not possible within the more concise ~SHEET | ||
# use `<Text class="frame:w100:h200" />` allows for a setting | ||
# of both the `width` and `height` values. | ||
|
||
# def class("frame:" <> dims) do | ||
# [width] = Regex.run(~r/w(\d+)/, dims, capture: :all_but_first) | ||
# [height] = Regex.run(~r/h(\d+)/, dims, capture: :all_but_first) | ||
# def class("frame:" <> dims) do | ||
# [width] = Regex.run(~r/w(\d+)/, dims, capture: :all_but_first) | ||
# [height] = Regex.run(~r/h(\d+)/, dims, capture: :all_but_first) | ||
|
||
# ~RULES""" | ||
# frame(width: {width}, height: {height}) | ||
# """ | ||
# end | ||
end | ||
# ~RULES""" | ||
# frame(width: {width}, height: {height}) | ||
# """ | ||
# end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.