React - component examples

0 votes
added May 10, 2019 in React by LC Marshal Captain (25,790 points)
// Breadcrumb component
import React from 'react';

class TransactionBreadcrumbComponent extends React.Component {

    render () {
        const transCat = 'Category',
              transPg = 'Page',
              backTransHome = "javascript:history.back()";
        return (
            <div className="breadcrumb-container  d-none d-lg-block">
              <div className="container-fluid">
                <nav aria-label="breadcrumb">
                  <ol className="breadcrumb">
                    <li className="breadcrumb-item"><a href="#"><i className="material-icons home-icon">home</i></a></li>
                    <li className="breadcrumb-item"><a onClick={transCat}>{transCat}</a></li>
                    <li className="breadcrumb-item"><a onClick={transPg}>{transPg}</a></li>
                  <span className="back-search">
                    <a href={backTransHome}>
                      <i className="material-icons back-button">arrow_back</i>
                      Back to Transaction Home
export default TransactionBreadcrumbComponent; - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.