Skip to content

Update button and button-link components

Matt Cotton requested to merge feature/update-button-components into main

Description

Update the button and button-link components based on learnings made on the Evoluted Site v2 build and make it compatible with both Craft and Statamic CMS'. Summary of changes:

button component

  • Remove link functionality (making this a pure button component)
  • Prevent data accidentally being passed to icons
  • Improve escape logic

button-link component

  • Remove 'pass through' functionality of including the button component
  • Add markup for anchor link functionality (link styled as a button)
  • Prevent data accidentally being passed to icons
  • improve escape logic
  • Add error handling logic for missing url

Testing

  1. Go to the button component in Fractal.
  2. Check that all of the button variants render as you'd expect from their description. Including checking that the HTMl (in the HTML tag) looks correct.
  3. Go to the button-link component in Fractal.
  4. Check that all of the button-link variants render as you'd expect from their description. Including checking that the HTMl (in the HTML tag) looks correct.
Edited by Matt Cotton

Merge request reports

Loading