Skip to content

Commit

Permalink
💄 Temp workaround for spectrum-css menu bug
Browse files Browse the repository at this point in the history
  • Loading branch information
macdonst committed Dec 16, 2020
1 parent c3b242a commit dde5e00
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Menu/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import React from 'react'
/** @jsx jsx */
import { css, jsx } from '@emotion/react'
import PropTypes from 'prop-types'
import classNames from 'classnames'

Expand Down Expand Up @@ -45,6 +46,13 @@ const Item = ({
{ 'is-selected': isSelected },
{ 'is-disabled': isDisabled }
])}
css={css`
padding: var(--spectrum-global-dimension-size-85)
var(--spectrum-listitem-padding-right)
var(--spectrum-global-dimension-size-85)
var(--spectrum-listitem-padding-right);
margin-bottom: 0px;
`}
role={!isSectionHeading ? 'menuitem' : 'group'}
aria-selected={isSelected}
aria-disabled={isDisabled}
Expand All @@ -63,7 +71,7 @@ const Item = ({
? 'spectrum-Menu-sectionHeading'
: 'spectrum-Menu-itemLabel'
}
style={isSectionHeading ? { marginTop: '0px' } : {}}
style={isSectionHeading ? { marginTop: '0px', padding: '0px' } : {}}
>
{children}
</span>
Expand Down

0 comments on commit dde5e00

Please sign in to comment.