v29.26.0
Minor Changes
-
Box: Add
borderBrandAccentLargetoboxShadowprop (#893) -
Text, Icons: Add brandAccent tone to Text and Icons (#893)
EXAMPLE USAGE:
<Text tone="brandAccent">...</Text>
-
Button,ButtonLink: Add variant to Button and deprecate weight (#893)
Introduces a new
variantprop toButton/ButtonLinkgiving consumers a single prop to use for selecting the visual style of the button. Choose fromsolid(default),ghost,softortransparent. The colour of the button is now consistently controlled via thetoneprop, with supported values being"brandAccent","critical"orundefined.As a result the
weightprop is now deprecated. See the migration guide below.EXAMPLE USAGE:
<Inline space="small" collapseBelow="desktop"> <Button>Solid</Button> <Button variant="ghost">Ghost</Button> <Button variant="soft">Soft</Button> <Button variant="transparent">Transparent</Button> </Inline>
MIGRATION GUIDE:
Theweightprop is now deprecated. If you are not specifying aweightthere is no change required.If you are, each weight can be migrated as follows:
Regular
Can be replicated with a
variantofsolid(default).-<Button weight="regular">...</Button> +<Button variant="solid">...</Button>
Given it is the default
variant, you could also choose to simply remove theweightprop.-<Button weight="regular">...</Button> +<Button>...</Button>
Strong
Can be replicated with a
variantofsolid(default), with atoneofbrandAccent.-<Button weight="strong">...</Button> +<Button tone="brandAccent">...</Button>
Weak
Can be replicated with a
variantofghost.-<Button weight="weak">...</Button> +<Button variant="ghost">...</Button>
Patch Changes
-
TextLink,TextLinkButton: Deprecate inside of Actions in favour of transparent Button (#893)
Usage of
TextLinkorTextLinkButtoninside of anActionscontainer should now use aButtonwith avariantoftransparent.Previously when a
TextLinkorTextLinkButtonwas placed inside of anActionscontainer, it would be given a custom layout to align with theButtonelements. We are deprecating this behaviour.MIGRATION GUIDE:
Going forwardActionsshould only containButtonelements. To migrate towards this, bothTextLinkandTextLinkButtonshould now use either aButtonLinkorButtonrespectively, with avariantortransparent.TextLink
<Actions> <Button>...</Button> - <TextLink href="...">...</TextLink> + <ButtonLink href="..." variant="transparent">...</ButtonLink> </Actions>
TextLinkButton
<Actions> <Button>...</Button> - <TextLinkButton onClick={...}>...</TextLinkButton> + <Button onClick={...} variant="transparent">...</Button> </Actions>
-
Button, ButtonLink: Remove all interactive styles when loading (#895)
No longer applies hover and cursor pointer styles when a
Buttonis set toloading.