Skip to content

Commit

Permalink
Removed margin props
Browse files Browse the repository at this point in the history
  • Loading branch information
thatblindgeye committed May 23, 2024
1 parent 737e053 commit 95c5160
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 343 deletions.
112 changes: 1 addition & 111 deletions packages/react-core/src/components/Toolbar/ToolbarGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>,
alignSelf?: 'start' | 'center' | 'baseline' | 'default';
/** Sets both the column and row gap at various breakpoints. */
gap?: {
default?: 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap_2xl' | 'gap_3xl' | 'gap_4xl';
default?: 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap2xl' | 'gap_3xl' | 'gap_4xl';
md?: 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap_2xl' | 'gap_3xl' | 'gap_4xl';
lg?: 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap_2xl' | 'gap_3xl' | 'gap_4xl';
xl?: 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap_2xl' | 'gap_3xl' | 'gap_4xl';
Expand Down Expand Up @@ -148,112 +148,6 @@ export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>,
| 'rowGao_3xl'
| 'rowGap_4xl';
};
/** Sets the margin-inline-start at various breakpoints. */
marginInlineStart?: {
default?:
| 'marginInlineStartNone'
| 'marginInlineStartXl'
| 'marginInlineStartSm'
| 'marginInlineStartMd'
| 'marginInlineStartLg'
| 'marginInlineStartXl'
| 'marginInlineStart2xl'
| 'marginInlineStart3xl'
| 'marginInlineStart4xl';
md?:
| 'marginInlineStartNone'
| 'marginInlineStartXl'
| 'marginInlineStartSm'
| 'marginInlineStartMd'
| 'marginInlineStartLg'
| 'marginInlineStartXl'
| 'marginInlineStart2xl'
| 'marginInlineStart3xl'
| 'marginInlineStart4xl';
lg?:
| 'marginInlineStartNone'
| 'marginInlineStartXl'
| 'marginInlineStartSm'
| 'marginInlineStartMd'
| 'marginInlineStartLg'
| 'marginInlineStartXl'
| 'marginInlineStart2xl'
| 'marginInlineStart3xl'
| 'marginInlineStart4xl';
xl?:
| 'marginInlineStartNone'
| 'marginInlineStartXl'
| 'marginInlineStartSm'
| 'marginInlineStartMd'
| 'marginInlineStartLg'
| 'marginInlineStartXl'
| 'marginInlineStart2xl'
| 'marginInlineStart3xl'
| 'marginInlineStart4xl';
'2xl'?:
| 'marginInlineStartNone'
| 'marginInlineStartXl'
| 'marginInlineStartSm'
| 'marginInlineStartMd'
| 'marginInlineStartLg'
| 'marginInlineStartXl'
| 'marginInlineStart2xl'
| 'marginInlineStart3xl'
| 'marginInlineStart4xl';
};
/** Sets the margin-inline-end at various breakpoints. */
marginInlineEnd?: {
default?:
| 'marginInlineEndNone'
| 'marginInlineEndXs'
| 'marginInlineEndSm'
| 'marginInlineEndMd'
| 'marginInlineEndLg'
| 'marginInlineEndXl'
| 'marginInlineEnd2xl'
| 'marginInlineEnd3xl'
| 'marginInlineEnd4xl';
md?:
| 'marginInlineEndNone'
| 'marginInlineEndXs'
| 'marginInlineEndSm'
| 'marginInlineEndMd'
| 'marginInlineEndLg'
| 'marginInlineEndXl'
| 'marginInlineEnd2xl'
| 'marginInlineEnd3xl'
| 'marginInlineEnd4xl';
lg?:
| 'marginInlineEndNone'
| 'marginInlineEndXs'
| 'marginInlineEndSm'
| 'marginInlineEndMd'
| 'marginInlineEndLg'
| 'marginInlineEndXl'
| 'marginInlineEnd2xl'
| 'marginInlineEnd3xl'
| 'marginInlineEnd4xl';
xl?:
| 'marginInlineEndNone'
| 'marginInlineEndXs'
| 'marginInlineEndSm'
| 'marginInlineEndMd'
| 'marginInlineEndLg'
| 'marginInlineEndXl'
| 'marginInlineEnd2xl'
| 'marginInlineEnd3xl'
| 'marginInlineEnd4xl';
'2xl'?:
| 'marginInlineEndNone'
| 'marginInlineEndXs'
| 'marginInlineEndSm'
| 'marginInlineEndMd'
| 'marginInlineEndLg'
| 'marginInlineEndXl'
| 'marginInlineEnd2xl'
| 'marginInlineEnd3xl'
| 'marginInlineEnd4xl';
};
/** Content to be rendered inside the data toolbar group */
children?: React.ReactNode;
/** Flag that modifies the toolbar group to hide overflow and respond to available space. Used for horizontal navigation. */
Expand All @@ -272,8 +166,6 @@ class ToolbarGroupWithRef extends React.Component<ToolbarGroupProps> {
gap,
columnGap,
rowGap,
marginInlineStart,
marginInlineEnd,
className,
variant,
children,
Expand All @@ -294,8 +186,6 @@ class ToolbarGroupWithRef extends React.Component<ToolbarGroupProps> {
formatBreakpointMods(gap, styles, '', getBreakpoint(width)),
formatBreakpointMods(columnGap, styles, '', getBreakpoint(width)),
formatBreakpointMods(rowGap, styles, '', getBreakpoint(width)),
formatBreakpointMods(marginInlineStart, styles, '', getBreakpoint(width)),
formatBreakpointMods(marginInlineEnd, styles, '', getBreakpoint(width)),
alignItems === 'start' && styles.modifiers.alignItemsStart,
alignItems === 'center' && styles.modifiers.alignItemsCenter,
alignItems === 'baseline' && styles.modifiers.alignItemsBaseline,
Expand Down
110 changes: 0 additions & 110 deletions packages/react-core/src/components/Toolbar/ToolbarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,112 +152,6 @@ export interface ToolbarItemProps extends React.HTMLProps<HTMLDivElement> {
| 'rowGao_3xl'
| 'rowGap_4xl';
};
/** Sets the margin-inline-start at various breakpoints. */
marginInlineStart?: {
default?:
| 'marginInlineStartNone'
| 'marginInlineStartXl'
| 'marginInlineStartSm'
| 'marginInlineStartMd'
| 'marginInlineStartLg'
| 'marginInlineStartXl'
| 'marginInlineStart2xl'
| 'marginInlineStart3xl'
| 'marginInlineStart4xl';
md?:
| 'marginInlineStartNone'
| 'marginInlineStartXl'
| 'marginInlineStartSm'
| 'marginInlineStartMd'
| 'marginInlineStartLg'
| 'marginInlineStartXl'
| 'marginInlineStart2xl'
| 'marginInlineStart3xl'
| 'marginInlineStart4xl';
lg?:
| 'marginInlineStartNone'
| 'marginInlineStartXl'
| 'marginInlineStartSm'
| 'marginInlineStartMd'
| 'marginInlineStartLg'
| 'marginInlineStartXl'
| 'marginInlineStart2xl'
| 'marginInlineStart3xl'
| 'marginInlineStart4xl';
xl?:
| 'marginInlineStartNone'
| 'marginInlineStartXl'
| 'marginInlineStartSm'
| 'marginInlineStartMd'
| 'marginInlineStartLg'
| 'marginInlineStartXl'
| 'marginInlineStart2xl'
| 'marginInlineStart3xl'
| 'marginInlineStart4xl';
'2xl'?:
| 'marginInlineStartNone'
| 'marginInlineStartXl'
| 'marginInlineStartSm'
| 'marginInlineStartMd'
| 'marginInlineStartLg'
| 'marginInlineStartXl'
| 'marginInlineStart2xl'
| 'marginInlineStart3xl'
| 'marginInlineStart4xl';
};
/** Sets the margin-inline-end at various breakpoints. */
marginInlineEnd?: {
default?:
| 'marginInlineEndNone'
| 'marginInlineEndXs'
| 'marginInlineEndSm'
| 'marginInlineEndMd'
| 'marginInlineEndLg'
| 'marginInlineEndXl'
| 'marginInlineEnd2xl'
| 'marginInlineEnd3xl'
| 'marginInlineEnd4xl';
md?:
| 'marginInlineEndNone'
| 'marginInlineEndXs'
| 'marginInlineEndSm'
| 'marginInlineEndMd'
| 'marginInlineEndLg'
| 'marginInlineEndXl'
| 'marginInlineEnd2xl'
| 'marginInlineEnd3xl'
| 'marginInlineEnd4xl';
lg?:
| 'marginInlineEndNone'
| 'marginInlineEndXs'
| 'marginInlineEndSm'
| 'marginInlineEndMd'
| 'marginInlineEndLg'
| 'marginInlineEndXl'
| 'marginInlineEnd2xl'
| 'marginInlineEnd3xl'
| 'marginInlineEnd4xl';
xl?:
| 'marginInlineEndNone'
| 'marginInlineEndXs'
| 'marginInlineEndSm'
| 'marginInlineEndMd'
| 'marginInlineEndLg'
| 'marginInlineEndXl'
| 'marginInlineEnd2xl'
| 'marginInlineEnd3xl'
| 'marginInlineEnd4xl';
'2xl'?:
| 'marginInlineEndNone'
| 'marginInlineEndXs'
| 'marginInlineEndSm'
| 'marginInlineEndMd'
| 'marginInlineEndLg'
| 'marginInlineEndXl'
| 'marginInlineEnd2xl'
| 'marginInlineEnd3xl'
| 'marginInlineEnd4xl';
};
/** id for this data toolbar item */
id?: string;
/** Flag indicating if the expand-all variant is expanded or not */
Expand All @@ -275,8 +169,6 @@ export const ToolbarItem: React.FunctionComponent<ToolbarItemProps> = ({
gap,
columnGap,
rowGap,
marginInlineStart,
marginInlineEnd,
align,
alignSelf,
alignItems,
Expand Down Expand Up @@ -305,8 +197,6 @@ export const ToolbarItem: React.FunctionComponent<ToolbarItemProps> = ({
formatBreakpointMods(gap, styles, '', getBreakpoint(width)),
formatBreakpointMods(columnGap, styles, '', getBreakpoint(width)),
formatBreakpointMods(rowGap, styles, '', getBreakpoint(width)),
formatBreakpointMods(marginInlineStart, styles, '', getBreakpoint(width)),
formatBreakpointMods(marginInlineEnd, styles, '', getBreakpoint(width)),
alignItems === 'start' && styles.modifiers.alignItemsStart,
alignItems === 'center' && styles.modifiers.alignItemsCenter,
alignItems === 'baseline' && styles.modifiers.alignItemsBaseline,
Expand Down
Loading

0 comments on commit 95c5160

Please sign in to comment.