Default Menu.clickableText to medium size

This commit is contained in:
Tessa Kelly 2024-02-09 14:55:02 -07:00
parent 26a8d836c7
commit 5baa92ee5b
2 changed files with 4 additions and 1 deletions

View File

@ -464,7 +464,7 @@ You will need to pass in the first and last focusable element in the dialog cont
}
, Table.custom
{ header = text "Pattern Notes"
, view = .patternNotes >> Text.smallBody
, view = .patternNotes >> List.map (List.singleton >> Text.smallBody) >> div []
, width = Css.pct 30
, cellStyles = always [ Css.padding2 (Css.px 14) (Css.px 7), Css.verticalAlign Css.middle ]
, sort = Nothing
@ -531,6 +531,7 @@ You will need to pass in the first and last focusable element in the dialog cont
]
, text ", so any attribute you use for a ClickableText can also used with this trigger."
]
, Text.markdown " Defaults to using the `ClickableText.medium` size, although this can be overriden."
]
}
, { menu = "Menu.clickableSvg with UiIcon.gear"

View File

@ -17,6 +17,7 @@ module Nri.Ui.Menu.V4 exposing
- Use Nri.Ui.WhenFocusLeaves.V2
- Adjust disabled styles
- when the Menu is a dialog or disclosure, _don't_ add role menuitem to the entries
- Use ClickableText.medium as the default size when the trigger is `Menu.clickableText`
Changes from V3:
@ -968,6 +969,7 @@ viewClickableText : String -> MenuConfig msg -> List (ClickableText.Attribute ms
viewClickableText title menuConfig clickableTextAttributes attributes =
ClickableText.button title
([ ClickableText.custom attributes
, ClickableText.medium
, ClickableText.disabled menuConfig.isDisabled
, ClickableText.rightIcon (AnimatedIcon.arrowDownUp menuConfig.isOpen)
, ClickableText.rightIconCss