Advertisement
Guest User

ProductDetailCard

a guest
Jun 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import * as React from 'react';
  2. import { Icon, Text } from 'telia-front-react';
  3.  
  4. interface ProductDetailCardProps {
  5. icon?: string;
  6. title?: string;
  7. children?: React.ReactChild | React.ReactChild[];
  8. }
  9.  
  10. export default class ProductDetailCard extends React.Component<ProductDetailCardProps, {}> {
  11. render() {
  12. const { icon, title, children } = this.props;
  13.  
  14. return (
  15. <Text className="text-center">
  16. {icon ? <Icon modifiers={icon} size="xxl" /> : null}
  17. {title ? <p className="text__margin">{title}</p> : null}
  18. <React.Fragment>{children}</React.Fragment>
  19. </Text>
  20. );
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement