Nov 9, 2022
  • Support data attribute boolean values

    The data attribute map now supports boolean values. This provides an improvement for the developer experience, no longer having to convert values to strings explicitly.

    EXAMPLE USAGE:

    <Component
      data={{
        'custom-attribute': true,
      }}
    />
    // => <div data-custom-attribute="true" />
May 19, 2021
  • Add support for data attribute maps on all components.

    EXAMPLE USAGE:

    <Alert
      data={{
        testId: 'message'
      }}
    />
    
    // => <div data-testId="message" />
Feb 3, 2021
  • Hidden: Add component support

    You can now customise the DOM element rendered when using Hidden. If no component is specified, it will fall back to the current behaviour — a div by default, or a span when setting inline to true.

    EXAMPLE USAGE:

    <Hidden component="li">
      ...
    </Hidden>
May 21, 2020
  • Hidden: Infer inline prop when nested inside Text or Heading

    Currently, if you want to hide content using the Hidden component in an inline context (e.g. hiding part of a sentence), you need to remember to set the inline boolean prop.

    Since most usages of this feature are within text, we now infer this for you automatically within the context of a Text or Heading component.

    MIGRATION GUIDE

    This change is not strictly required, but you can now clean up your code like this:

    -<Text>The end of this sentence is... <Hidden inline below="tablet">hidden on mobile.</Hidden>
    +<Text>The end of this sentence is... <Hidden below="tablet">hidden on mobile.</Hidden>