Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FE][UI] Fix hamburger menu. Remove breakpoint and close/open on clic… #1391

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

### Fixed

## [0.36.2] - 2024-07-02

- Fixed HamburguerMenu in Storybook

### Fixed

## [0.36.1] - 2024-06-25

- Fixed backgroundImg of CardHome
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itacademy/ui",
"version": "0.36.1",
"version": "0.36.2",
"description": "React FE components for ITAcademy projects.",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.es.js",
Expand Down
6 changes: 1 addition & 5 deletions packages/ui/src/components/atoms/HamburgerMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FC } from 'react'
import styled from 'styled-components'
import { colors, dimensions, device } from '../../styles'
import { colors, dimensions } from '../../styles'

export type THamburgerMenu = {
open: boolean
Expand Down Expand Up @@ -46,10 +46,6 @@ const StyledBurger = styled.button<THamburgerMenu>`
transform: ${({ open }) => (open ? 'rotate(-45deg)' : 'rotate(0)')};
}
}

@media ${device.Tablet} {
display: none;
}
`

export const HamburgerMenu: FC<THamburgerMenu> = ({ open, onClick }) => (
Expand Down
7 changes: 1 addition & 6 deletions packages/ui/src/stories/atoms/HamburgerMenu.stories.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import type { Meta, StoryObj } from '@storybook/react'
import { HamburgerMenu } from '../../components/atoms'

// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
const meta = {
const meta: Meta<typeof HamburgerMenu> = {
title: 'Atoms/HamburgerMenu',
component: HamburgerMenu,
parameters: {
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
layout: 'centered',
},
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
tags: ['autodocs'],
// More on argTypes: https://storybook.js.org/docs/api/argtypes
argTypes: {
open: { control: 'boolean' },
onClick: { action: 'clicked' },
Expand All @@ -21,7 +17,6 @@ const meta = {
export default meta
type HamburgerMenuStory = StoryObj<typeof HamburgerMenu>

// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
export const Closed: HamburgerMenuStory = {
args: {
open: false,
Expand Down
Loading