diff --git a/lib/bitstyles_phoenix/bitstyles.ex b/lib/bitstyles_phoenix/bitstyles.ex index 91311b2..9f4788e 100644 --- a/lib/bitstyles_phoenix/bitstyles.ex +++ b/lib/bitstyles_phoenix/bitstyles.ex @@ -36,6 +36,16 @@ defmodule BitstylesPhoenix.Bitstyles do String.replace(acc, "-#{new_size}", "-#{old_size}") end) + border_color_renaming = %{ + "u-border-gray-light" => "u-border-gray-10", + "u-border-gray-dark" => "u-border-gray-70" + } + + class = + Enum.reduce(border_color_renaming, class, fn {new_border_color, old_border_color}, acc -> + String.replace(acc, new_border_color, old_border_color) + end) + class = case class do "u-list-none" -> "a-list-reset" diff --git a/lib/bitstyles_phoenix/component/heading.ex b/lib/bitstyles_phoenix/component/heading.ex index 88ac89c..c06e4d0 100644 --- a/lib/bitstyles_phoenix/component/heading.ex +++ b/lib/bitstyles_phoenix/component/heading.ex @@ -133,7 +133,7 @@ defmodule BitstylesPhoenix.Component.Heading do """ end - @section_default_border_color "gray-10" + @section_default_border_color "gray-light" @doc ~s""" Render a section header with optional `action`s and `title_extra`. @@ -141,7 +141,7 @@ defmodule BitstylesPhoenix.Component.Heading do ## Attributes - `class` - Set CSS classes on the outer div. - `border` - Controls the bottom border and padding (default: true, boolean) - - `border_color` - The border color, defaults to `gray-10` resulting in `u-border-gray-10-bottom`. + - `border_color` - The border color, defaults to `gray-light` resulting in `u-border-gray-light-bottom`. - `tag` - the heading tag (defaults to h3) - `heading_class` - Extra classes on the heading - All other attributes are passed to the outer `div` tag. @@ -168,7 +168,7 @@ defmodule BitstylesPhoenix.Component.Heading do ''', ''' """ -
+

Section title @@ -209,7 +209,7 @@ defmodule BitstylesPhoenix.Component.Heading do ''' iex> assigns = %{} ...> render ~H""" - ...> <.ui_section_title border_color="gray-70" heading_class="extra"> + ...> <.ui_section_title border_color="gray-light" heading_class="extra"> ...> Section title ...> <:title_extra> ...> <.ui_badge>Published @@ -228,7 +228,7 @@ defmodule BitstylesPhoenix.Component.Heading do ''', ''' """ -
+

Section title diff --git a/lib/bitstyles_phoenix/component/sidebar.ex b/lib/bitstyles_phoenix/component/sidebar.ex index 781fd56..fc21923 100644 --- a/lib/bitstyles_phoenix/component/sidebar.ex +++ b/lib/bitstyles_phoenix/component/sidebar.ex @@ -45,7 +45,7 @@ defmodule BitstylesPhoenix.Component.Sidebar do