Skip to content

Instantly share code, notes, and snippets.

@jokamjohn
Last active April 26, 2020 16:41
Show Gist options
  • Save jokamjohn/6cbe1ca44b7eaedaa7cf898e56597449 to your computer and use it in GitHub Desktop.
Save jokamjohn/6cbe1ca44b7eaedaa7cf898e56597449 to your computer and use it in GitHub Desktop.
import React from "react";
import styled from 'styled-components';
const DropDownContainer = styled("div")``;
const DropDownHeader = styled("div")``;
const DropDownListContainer = styled("div")``;
const DropDownList = styled("ul")``;
const ListItem = styled("li")``;
export default function App() {
return (
<div className="App">
<h1>Custom Select/dropdown</h1>
<DropDownContainer>
<DropDownHeader>Mangoes</DropDownHeader>
<DropDownListContainer>
<DropDownList>
<ListItem>Mangoes</ListItem>
<ListItem>Apples</ListItem>
<ListItem>Oranges</ListItem>
</DropDownList>
</DropDownListContainer>
</DropDownContainer>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment