mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-28 10:17:49 +03:00
Remove the assets from the premium checkbox
This commit is contained in:
parent
88855afc16
commit
51e953d0cf
@ -1,4 +1,4 @@
|
||||
module Nri.Ui.PremiumCheckbox.V4 exposing (PremiumConfig, premium, Pennant(..))
|
||||
module Nri.Ui.PremiumCheckbox.V5 exposing (PremiumConfig, premium, Pennant(..))
|
||||
|
||||
{-|
|
||||
|
||||
@ -9,8 +9,6 @@ module Nri.Ui.PremiumCheckbox.V4 exposing (PremiumConfig, premium, Pennant(..))
|
||||
import Accessibility.Styled as Html
|
||||
import Css exposing (..)
|
||||
import Html.Styled.Attributes as Attributes exposing (css)
|
||||
import Nri.Ui.AssetPath exposing (Asset(..))
|
||||
import Nri.Ui.AssetPath.Css
|
||||
import Nri.Ui.Checkbox.V5 as Checkbox
|
||||
|
||||
|
||||
@ -43,8 +41,8 @@ type Pennant
|
||||
|
||||
{-| A checkbox that should be used for premium content
|
||||
-}
|
||||
premium : Assets a -> PremiumConfig msg -> Html.Html msg
|
||||
premium assets config =
|
||||
premium : PremiumConfig msg -> Html.Html msg
|
||||
premium config =
|
||||
Html.div
|
||||
[ css
|
||||
[ displayFlex
|
||||
@ -72,21 +70,21 @@ premium assets config =
|
||||
, case config.pennant of
|
||||
Just pennant ->
|
||||
Html.div
|
||||
[ Attributes.class "premium-checkbox-V1__PremiumClass"
|
||||
[ Attributes.class "premium-checkbox-V5__PremiumClass"
|
||||
, css
|
||||
[ property "content" "''"
|
||||
, display inlineBlock
|
||||
, width (px 26)
|
||||
, height (px 24)
|
||||
, marginLeft (px 8)
|
||||
, backgroundImage
|
||||
(case pennant of
|
||||
Premium ->
|
||||
assets.iconPremiumFlag_svg
|
||||
|
||||
PremiumWithWriting ->
|
||||
assets.iconPremiumWithWritingFlag_svg
|
||||
)
|
||||
-- , backgroundImage
|
||||
-- (case pennant of
|
||||
-- Premium ->
|
||||
-- assets.iconPremiumFlag_svg
|
||||
-- PremiumWithWriting ->
|
||||
-- assets.iconPremiumWithWritingFlag_svg
|
||||
-- )
|
||||
, backgroundRepeat noRepeat
|
||||
, backgroundPosition center
|
||||
]
|
||||
@ -96,18 +94,3 @@ premium assets config =
|
||||
Nothing ->
|
||||
Html.text ""
|
||||
]
|
||||
|
||||
|
||||
{-| The assets used in this module.
|
||||
-}
|
||||
type alias Assets r =
|
||||
{ r
|
||||
| iconPremiumFlag_svg : Asset
|
||||
, iconPremiumWithWritingFlag_svg : Asset
|
||||
}
|
||||
|
||||
|
||||
backgroundImage : Asset -> Style
|
||||
backgroundImage =
|
||||
Nri.Ui.AssetPath.Css.url
|
||||
>> property "background-image"
|
||||
|
@ -32,8 +32,6 @@ type alias Assets =
|
||||
, help : String
|
||||
, hint_png : Asset
|
||||
, iconFlag_png : Asset
|
||||
, iconPremiumFlag_svg : Asset
|
||||
, iconPremiumWithWritingFlag_svg : Asset
|
||||
, icons_equals_svg : Asset
|
||||
, icons_xBlue_svg : Asset
|
||||
, key : String
|
||||
@ -104,8 +102,6 @@ assets =
|
||||
, help = "icon-help"
|
||||
, hint_png = Asset "assets/images/hint.png"
|
||||
, iconFlag_png = Asset "assets/images/icon-flag.png"
|
||||
, iconPremiumFlag_svg = Asset "assets/images/icon_premium_flag.svg"
|
||||
, iconPremiumWithWritingFlag_svg = Asset "assets/images/icon_premium_writing_flag.svg"
|
||||
, icons_equals_svg = Asset "assets/images/equals.svg"
|
||||
, icons_xBlue_svg = Asset "assets/images/x-blue.svg"
|
||||
, key = "icon-key"
|
||||
|
@ -6,14 +6,13 @@ module Examples.Checkbox exposing (Msg, State, example, init, update)
|
||||
|
||||
-}
|
||||
|
||||
import Assets exposing (assets)
|
||||
import Css
|
||||
import Html.Styled as Html exposing (..)
|
||||
import Html.Styled.Attributes exposing (css)
|
||||
import ModuleExample as ModuleExample exposing (Category(..), ModuleExample)
|
||||
import Nri.Ui.Checkbox.V5 as Checkbox
|
||||
import Nri.Ui.Data.PremiumLevel as PremiumLevel exposing (PremiumLevel(..))
|
||||
import Nri.Ui.PremiumCheckbox.V4 as PremiumCheckbox
|
||||
import Nri.Ui.PremiumCheckbox.V5 as PremiumCheckbox
|
||||
import Set exposing (Set)
|
||||
|
||||
|
||||
@ -177,7 +176,6 @@ viewPremiumCheckboxes state =
|
||||
let
|
||||
checkbox config =
|
||||
PremiumCheckbox.premium
|
||||
assets
|
||||
{ label = config.label
|
||||
, id = "premium-checkbox-" ++ config.label
|
||||
, selected =
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3bcb4a83ca4e7c4739748a81d5f56fbedf9d9925fe1db8e9fe2e4312c3fa21d2
|
||||
size 1069
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:16221aee450224605f8a4aae798ed2ebbba3698fac2dc101d0132729e8f5cdce
|
||||
size 817
|
Loading…
Reference in New Issue
Block a user