Fix dropdown position (#3)

* display site name

* fix dropdown position absolute
This commit is contained in:
Florian Herrengt 2023-08-04 19:04:58 +01:00 committed by GitHub
parent d3d450c146
commit 37a74aca5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View File

@ -9,5 +9,5 @@
} }
</style> </style>
<div id="root"></div> <div id="root"></div>
<!-- <script src="https://d3e54v103j8qbb.cloudfront.net/gen/js/entrypoint-designer-extensions-client.e4ef1682e412a922c7e4.js"></script> --> <script src="https://d3e54v103j8qbb.cloudfront.net/gen/js/entrypoint-designer-extensions-client.e4ef1682e412a922c7e4.js"></script>
<script type="module" src="src/main.tsx"></script> <script type="module" src="src/main.tsx"></script>

View File

@ -11,7 +11,18 @@ export interface DropdownProps {
const DropdownOptions: React.FC<DropdownProps> = (props) => { const DropdownOptions: React.FC<DropdownProps> = (props) => {
return ( return (
<div style={{}}> <div
style={{
position: "absolute",
zIndex: 100,
...theme.background.secondary,
...theme.border.primary,
borderTop: 0,
top: 25,
width: "100%",
left: -1,
}}
>
{props.options.map(({ label, value }) => ( {props.options.map(({ label, value }) => (
<div <div
style={{ display: "flex", padding: "4px 8px", cursor: "pointer" }} style={{ display: "flex", padding: "4px 8px", cursor: "pointer" }}

View File

@ -26,7 +26,7 @@ export const theme: Theme = {
primary: { primary: {
borderColor: "#363636", borderColor: "#363636",
borderWidth: 1, borderWidth: 1,
borderRadius: 1, borderRadius: 2,
borderStyle: "solid", borderStyle: "solid",
}, },
}, },