Skip to content

Commit

Permalink
Revert change for __next40pxDefaultSize.
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia committed Dec 9, 2024
1 parent f3ca085 commit 02723d9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,7 @@ export default function FiltersPanel( {

return (
<ItemGroup isBordered isSeparated>
<Item
as="button"
__next40pxDefaultSize
{ ...toggleProps }
>
<Item as="button" { ...toggleProps }>
<LabeledColorIndicator
indicator={ duotone }
label={ __( 'Duotone' ) }
Expand Down
5 changes: 2 additions & 3 deletions packages/components/src/item-group/item/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export function useItem( props: WordPressComponentProps< ItemProps, 'div' > ) {
onClick,
role = 'listitem',
size: sizeProp,
__next40pxDefaultSize,
...otherProps
} = useContextSystem( props, 'Item' );

Expand All @@ -36,13 +35,13 @@ export function useItem( props: WordPressComponentProps< ItemProps, 'div' > ) {
() =>
cx(
( as === 'button' || as === 'a' ) &&
styles.unstyledButton( as, __next40pxDefaultSize ),
styles.unstyledButton( as ),
styles.itemSizes[ size ] || styles.itemSizes.medium,
styles.item,
spacedAround && styles.spacedAround,
className
),
[ as, className, cx, size, spacedAround, __next40pxDefaultSize ]
[ as, className, cx, size, spacedAround ]
);

const wrapperClassName = cx( styles.itemWrapper );
Expand Down
8 changes: 1 addition & 7 deletions packages/components/src/item-group/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import { css } from '@emotion/react';
*/
import { CONFIG, COLORS, font } from '../utils';

export const unstyledButton = (
as: 'a' | 'button',
__next40pxDefaultSize: boolean | undefined
) => {
export const unstyledButton = ( as: 'a' | 'button' ) => {
return css`
font-size: ${ font( 'default.fontSize' ) };
font-family: inherit;
Expand All @@ -21,9 +18,6 @@ export const unstyledButton = (
background: none;
text-align: start;
text-decoration: ${ as === 'a' ? 'none' : undefined };
height: ${ __next40pxDefaultSize && as === 'button'
? '40px'
: undefined };
svg,
path {
fill: currentColor;
Expand Down
6 changes: 0 additions & 6 deletions packages/components/src/item-group/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ export interface ItemProps {
* @default 'medium'
*/
size?: ItemSize;
/**
* Start opting into the larger default height that will become the default size in a future version.
*
* @default false
*/
__next40pxDefaultSize?: boolean;
/**
* The children elements.
*/
Expand Down

0 comments on commit 02723d9

Please sign in to comment.