mirror of
https://github.com/dzeiocom/components.git
synced 2025-04-22 19:02:15 +00:00
Removed Menu as it was replaced in Navbar
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
69b74e2f03
commit
ae7dde8802
@ -1,19 +0,0 @@
|
||||
@import '../config'
|
||||
|
||||
.menu
|
||||
position absolute
|
||||
opacity 0
|
||||
background white
|
||||
pointer-events none
|
||||
border-radius 4px
|
||||
box-shadow 0 2px 4px 2px rgba(black, 25%)
|
||||
z-index 99
|
||||
transition opacity $transition
|
||||
a
|
||||
display block
|
||||
text-align center
|
||||
padding 16px
|
||||
|
||||
&.shown
|
||||
opacity 1
|
||||
pointer-events initial
|
@ -1,13 +0,0 @@
|
||||
import { Meta } from '@storybook/react/types-6-0'
|
||||
import React from 'react'
|
||||
import Component from '.'
|
||||
|
||||
export default {
|
||||
title: 'DZEIO/Menu',
|
||||
component: Component,
|
||||
argTypes: {
|
||||
content: {control: 'array', defaultValue: [{name: 'Name', href: 'https://www.google.com'}]}
|
||||
}
|
||||
} as Meta
|
||||
|
||||
export const Basic = (args: any) => <Component {...args} />
|
@ -1,25 +0,0 @@
|
||||
import React from 'react'
|
||||
import Link from 'next/link'
|
||||
|
||||
import { buildClassName } from '../Util'
|
||||
import css from './Menu.module.styl'
|
||||
|
||||
interface Props {
|
||||
pos?: {top?: number, bottom?: number, left?: number, right?: number}
|
||||
content: Array<{name: string, href: string, as?: string}>
|
||||
show?: boolean
|
||||
}
|
||||
|
||||
export default class Menu extends React.Component<Props> {
|
||||
|
||||
public render = () => (
|
||||
<div className={buildClassName([css.menu], [css.shown, this.props.show])} style={this.props.pos}>
|
||||
{this.props.content.map((item, index) => (
|
||||
<Link key={index} href={item.href} as={item.as}>
|
||||
<a>{item.name}</a>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
|
||||
}
|
@ -19,7 +19,6 @@ import Image from './dzeio/Image'
|
||||
import Input from './dzeio/Input'
|
||||
import Link from './dzeio/Link'
|
||||
import Loader from './dzeio/Loader'
|
||||
import Menu from './dzeio/Menu'
|
||||
import Navbar from './dzeio/Navbar'
|
||||
import Overflow from './dzeio/Overflow'
|
||||
import Popup from './dzeio/Popup'
|
||||
|
Loading…
x
Reference in New Issue
Block a user