Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(icon-lockup): add icon lockup component #2277

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bsahitya
Copy link
Collaborator

@bsahitya bsahitya commented Nov 8, 2024

Description

Add cv-icon-lockup component to the library. It displays text and icon side by side.

Design spec: Figma

What's included?

cv-icon-lockup component with the below properties:

  • covalentIcon: (Boolean) - Determines whether the icon is a Covalent icon. Default is false.
  • filledIcon: (Boolean) - Indicates if the icon is filled. Default is false.
  • icon: (String) - Specifies the icon to display. Default is an empty string ''.
  • scale: (String) - Controls the scale of the component, affecting font-size and icon size. The default is "body1", but other values can be used to scale the component.
  • state: (String) - Defines the state of the component, allowing for different styles based on status. Can be one of 'primary' | 'positive' | 'negative' | 'caution' | null.
  • trailingIcon: (Boolean) - When true, the icon is displayed after the text (trailing); when false, it is displayed before the text. Default is false.

Slots

  • Default slot: For the text content.
  • icon: For custom icons if needed. Ex: loading states.

Test Steps

  • npm run storybook
  • then navigate to Icon lockup
  • Verify the component works as desired

General Tests for Every PR

  • npm run start still works.
  • npm run lint passes.
  • npm run stylelint passes.
  • npm test passes and code coverage is not lower.
  • npm run build still works.
Screenshots or link to StackBlitz/Plunker

icon-lockup

@bsahitya bsahitya requested a review from adamnel November 8, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants