troubleshooting Question

Need help formatting a drop-down Menu used on a React.jsx

Avatar of Crystal Rouse
Crystal RouseFlag for United States of America asked on
CSSC#* ReactJS
1 Comment1 Solution111 ViewsLast Modified:
I have a React.jsx View that includes a Menu bar at the top of the page.  I need to add a dropdown-menu and would like to use the caret symbol.  
I'm not sure how to add this to the scss file or the react file.

My MenuBar.scss file has:

div.MenuBar {
    background-color: rgba(0, 0, 0, .5);
    color: white;
    line-height: $menuHeight;
    border-radius: 3px;
    border: 2px solid black;

    .MenuOption, .MenuDropdown {
        display: inline-block;
        font-weight: bold;
        cursor: pointer;
        padding: 0 calc(#{$menuHeight} / 2);

        &:hover:not(.NotificationOption) {
            background-color: rgba(0, 0, 0, .75);
        }

        &.MenuOptionRight {
            float: right;
        }

        &.selected {
            color: azure;
            font-style: italic;
            cursor: not-allowed;

            &:hover {
                background-color: transparent;
            }
        }
    }

    .MenuDropdown {
        position: relative;

        & > .options {
            position: absolute;
            top: $menuHeight;
            left: 20px;
            z-index: 9000;
            width: 210px;
            background-color: rgba(0, 0, 0, .75);
            border-radius: 3px;
            border: 2px solid black;

            .MenuOption {
                display: block;
            }
        }
    }
}

My React.js file has:

 _getMenu() {

var tmpOps = [];

        tmpOps.push(
            <MenuOption onClick={() => this.go(this.urls.URLGOESHERE)}
                key="URLLink">
                URL TEXT
                </MenuOption>
        ),

            tmpOps.push(
                <MenuOption onClick={() => this.go(this.urls.LINKGOESHERE)}
                    key="URLLink">
                    ANOTHER LINK
                </MenuOption>
            );

        menuOps.push(
            <MenuOption drop
                options={tmpOps}
                key="KeyText">
                DROPDOWN LINK TEXT
                </MenuOption>
        );

 return menuOps;
    },

Of course there are a lot more links but this snippet shows a drop-down menu that I want to add the additional caret symbol to.  Not sure how to proceed.  I'm really new to React and styling.
I inherited this code.  Thanks for any help!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros