bluewave-labs / bluewave-onboarding

https://bluewavelabs.ca
GNU Affero General Public License v3.0
22 stars 3 forks source link

Create a new CustomLabelTag component #96

Closed uparkalau closed 1 month ago

uparkalau commented 2 months ago

We need to create a new CustomLabelTag component that aligns with our project's design system and can be reused across our application. This component should be versatile enough to handle different types of labels.

To-Do List

PropTypes Example, adjust as necessary:


const validateBackgroundColor = (props, propName, componentName) => {
  if (!['orange', 'red', 'purple', 'white'].includes(props[propName])) {
    return new Error(
      `Invalid prop \`${propName}\` supplied to \`${componentName}\`. Validation failed.`
    );
  }
}

CustomLabelTag.propTypes = {
  text: PropTypes.string.isRequired,
  backgroundColor: validateBackgroundColor,
  textColor: PropTypes.string,
  className: PropTypes.string,
};

https://www.figma.com/design/USQRG7Oacv7uXw8XkTPINq/Style-guide?node-id=48-52733&t=nNFDTU9Sv5F8SXq9-0

image