forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: Fancier menus, more SIP-34-ish (apache#10423)
* style: shinier menus * fixing mouseover glitch * unused import * rm emotion-reset * restoring default config values * lint fixes ✨ * a bit more pizzaz to the underlines (max's idea), fading active background * simplifying navtitle -> label * RBNavDropdown -> ReactBootstrapNavDropdown * nixing whitespace * replacing !importants with better selector specificity * moving Menu LESS into Emotion * no more border! * fixing border issue * language picker, account dropdown now use new dropdown component * nixing whitespace in comment * nixing duplicate styling * removing borders on FAB navbar * explicit font coloring * linting
- Loading branch information
Showing
9 changed files
with
144 additions
and
75 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/** | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import styled from '@superset-ui/style'; | ||
import { NavDropdown as ReactBootstrapNavDropdown } from 'react-bootstrap'; | ||
|
||
const NavDropdown = styled(ReactBootstrapNavDropdown)` | ||
&.dropdown > a.dropdown-toggle { | ||
padding-right: ${({ theme }) => theme.gridUnit * 6}px; | ||
} | ||
& > a { | ||
transition: background-color ${({ theme }) => theme.transitionTiming}s; | ||
} | ||
&.dropdown.open > a.dropdown-toggle { | ||
background: ${({ theme }) => theme.colors.primary.light4}; | ||
} | ||
:after { | ||
content: ''; | ||
height: ${({ theme }) => theme.gridUnit}px; | ||
width: ${({ theme }) => theme.gridUnit * 2}px; | ||
background: url('/static/assets/images/icons/dropdown-arrow.svg'); | ||
background-size: contain; | ||
background-position: center center; | ||
background-repeat: no-repeat; | ||
position: absolute; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
right: ${({ theme }) => theme.gridUnit * 2}px; | ||
transition: opacity ${({ theme }) => theme.transitionTiming}s; | ||
opacity: ${({ theme }) => theme.opacity.mediumLight}; | ||
pointer-events: none; | ||
} | ||
&:hover, | ||
&.active { | ||
&:after { | ||
opacity: ${({ theme }) => theme.opacity.mediumHeavy}; | ||
} | ||
} | ||
.dropdown-menu { | ||
padding: ${({ theme }) => theme.gridUnit}px 0; | ||
top: 100%; | ||
border: none; | ||
& li a { | ||
padding: ${({ theme }) => theme.gridUnit}px | ||
${({ theme }) => theme.gridUnit * 4}px; | ||
transition: all ${({ theme }) => theme.transitionTiming}s; | ||
&:hover { | ||
background: ${({ theme }) => theme.colors.primary.light4}; | ||
color: ${({ theme }) => theme.colors.grayscale.dark1}; | ||
} | ||
} | ||
} | ||
`; | ||
|
||
export default NavDropdown; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters