Dejvino's Curriculum Vitae
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
800 B

  1. import React from 'react';
  2. import Container from 'react-bootstrap/Container';
  3. export type Props = {
  4. title: string,
  5. icon?: string,
  6. tags: string[],
  7. style?: 'primary' | 'light'
  8. }
  9. function Tag(props: {text: string}) {
  10. return (
  11. <span className='badge text-bg-light'>{props.text}</span>
  12. )
  13. }
  14. export default function TagCloud(props: Props) {
  15. const containerClasses = ['tag-cloud', 'cloud-' + (props.style || 'standard')]
  16. return (
  17. <Container className={containerClasses.join(' ')}>
  18. <h4>{props.icon && (<i className={'bi-' + props.icon}> </i>)}{props.title}</h4>
  19. <Container className='tag-badges'>
  20. {props.tags.map((tag: string) => (<Tag key={tag} text={tag} />) )}
  21. </Container>
  22. </Container>
  23. )
  24. }