department-of-veterans-affairs / va-mobile-library

https://department-of-veterans-affairs.github.io/va-mobile-library/
ISC License
0 stars 0 forks source link

DS - Update Spacer convenience component to be a standalone component #257

Closed TimRoe closed 1 month ago

TimRoe commented 3 months ago

Description

Ticket #132 created a Spacer component in the utils as a handy way to fill out spacing among elements in the Alert component. This was added to the utils file, but realistically it is more or less a convenience component similar to Icon (even if much simpler). It should likely be handled similarly to icon, having its' own folder/unit tests/stories. As it's a very simple component this can all be done in one ticket.

Acceptance Criteria

- [x] Move the Spacer component from the utils file to have `Spacer/Spacer.tsx` (folder/file) like other components - [x] Create some simple unit tests for it (validate default size, custom size, horizontal) - [x] Create a simple story so it appears as available in Storybook - [x] Add basic documentation similar to Icon to appear in Storybook - [x] Publish minor version "releasing" Spacer component **Accessibility Requirements** - None, Alert testing already validated it's correctly ignored and should not scale (for MVP implementation, maybe should be added in the future) with font