Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a title slot to the Card component (#1638)
# Pull Request Add a title slot for the `nimble-card` component. See #296 and the [`nimble-card` spec](https://github.com/ni/nimble/blob/main/packages/nimble-components/src/card/specs/README.md) for more information. ## 🤨 Rationale The `title` slot in the `nimble-card` component will make it easy for clients to add a title with the correct styling and to enforce consistency across usages. The style itself is still a placeholder. We'll apply styles from a visual design in a future PR, before releasing the Routines UI with the card component. ## 👩💻 Implementation - Add a `slot` with `name="title"` to the `nimble-card` template - Add a style to apply a title font to the title slot (placeholder, may require additional styling from visual design) - For accessibility, put a `section` at the root of the component template - Use `display: contents` to allow the `host` display settings to apply directly to the slotted content. - Add a title to the matrix stories - Add a configurable title to the storybook page. - Modeled after the `nimble-banner` with similar description text for the title. ## 🧪 Testing Updated storybook and matrix tests: ![image](https://github.com/ni/nimble/assets/35350751/9a7e5bd4-dd3e-4a48-b527-de924e2391b6) ![image](https://github.com/ni/nimble/assets/35350751/4606f41e-d499-435c-a5e3-0947ff2238c7) ## ✅ Checklist - [x] I have updated the project documentation to reflect my changes or determined no changes are needed.
- Loading branch information