Skip to content

Commit

Permalink
remove constant
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Jan 15, 2025
1 parent 5ea4660 commit 06f2fdb
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 89 deletions.
4 changes: 2 additions & 2 deletions components/src/atoms/MenuList/MenuItem.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { STYLE_PROPS } from '../../primitives'
import { VIEWPORT } from '../../ui-style-constants'
import { allDefaultStorybookControlsWithStyleProps } from '../../constants'
import { MenuItem as MenuItemComponent } from './MenuItem'
import type { Meta, StoryObj } from '@storybook/react'

Expand All @@ -10,7 +10,7 @@ const meta: Meta<typeof MenuItemComponent> = {
argTypes: {
// Disable all StyleProps
...Object.fromEntries(
allDefaultStorybookControlsWithStyleProps.map(prop => [
[...STYLE_PROPS, 'as', 'ref', 'theme', 'forwardedAs'].map(prop => [
prop,
{ table: { disable: true } },
])
Expand Down
17 changes: 13 additions & 4 deletions components/src/atoms/MenuList/MenuList.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { action } from '@storybook/addon-actions'
import { Flex } from '../../primitives'
import { Flex, STYLE_PROPS } from '../../primitives'
import { DIRECTION_COLUMN } from '../../styles'
import { MenuList as MenuListComponent } from './index'
import { MenuItem } from './MenuItem'
Expand All @@ -11,8 +10,18 @@ const menuBtn = 'Example menu btn'
const meta: Meta<typeof MenuListComponent> = {
title: 'Helix/Atoms/MenuList',
component: MenuListComponent,
args: {
onClick: action('clicked'),
argTypes: {
// Disable all StyleProps
...Object.fromEntries(
[
...STYLE_PROPS,
'as',
'ref',
'theme',
'forwardedAs',
'className',
].map(prop => [prop, { table: { disable: true } }])
),
},
}

Expand Down
80 changes: 0 additions & 80 deletions components/src/constants.ts

This file was deleted.

2 changes: 0 additions & 2 deletions components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,3 @@ export * from './molecules'

// Atoms
export * from './atoms'

export * from './constants'
2 changes: 1 addition & 1 deletion components/src/primitives/style-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const POSITION_PROPS = [

const TRANSITION_PROPS = ['transition'] as const

const STYLE_PROPS = [
export const STYLE_PROPS = [
...COLOR_PROPS,
...TYPOGRAPHY_PROPS,
...SPACING_PROPS,
Expand Down

0 comments on commit 06f2fdb

Please sign in to comment.