Skip to content
Merged
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
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

- `ToggleControl`: Add `__nextHasNoMargin` prop for opting into the new margin-free styles ([#43717](https://github.com/WordPress/gutenberg/pull/43717)).
- `CheckboxControl`: Add `__nextHasNoMargin` prop for opting into the new margin-free styles ([#43720](https://github.com/WordPress/gutenberg/pull/43720)).
- `TextControl`, `TextareaControl`: Add `__nextHasNoMargin` prop for opting into the new margin-free styles ([#43782](https://github.com/WordPress/gutenberg/pull/43782)).
- `RangeControl`: Tweak dark gray marking color to be consistent with the grays in `@wordpress/base-styles` ([#43773](https://github.com/WordPress/gutenberg/pull/43773)).
- `UnitControl`: Tweak unit dropdown color to be consistent with the grays in `@wordpress/base-styles` ([#43773](https://github.com/WordPress/gutenberg/pull/43773)).
- `CardHeader`, `CardBody`, `CardFooter`: Tweak `isShady` background colors to be consistent with the grays in `@wordpress/base-styles` ([#43719](https://github.com/WordPress/gutenberg/pull/43719)).
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/text-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function UnforwardedTextControl(
ref: ForwardedRef< HTMLInputElement >
) {
const {
__nextHasNoMarginBottom,
label,
hideLabelFromVision,
value,
Expand All @@ -37,6 +38,7 @@ function UnforwardedTextControl(

return (
<BaseControl
__nextHasNoMarginBottom={ __nextHasNoMarginBottom }
label={ label }
hideLabelFromVision={ hideLabelFromVision }
id={ id }
Expand Down
6 changes: 5 additions & 1 deletion packages/components/src/text-control/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import type { BaseControlProps } from '../base-control/types';

export type TextControlProps = Pick<
BaseControlProps,
'className' | 'hideLabelFromVision' | 'help' | 'label'
| 'className'
| 'hideLabelFromVision'
| 'help'
| 'label'
| '__nextHasNoMarginBottom'
> & {
/**
* A function that receives the value of the input.
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/textarea-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export function TextareaControl(
props: WordPressComponentProps< TextareaControlProps, 'textarea', false >
) {
const {
__nextHasNoMarginBottom,
label,
hideLabelFromVision,
value,
Expand All @@ -59,6 +60,7 @@ export function TextareaControl(

return (
<BaseControl
__nextHasNoMarginBottom={ __nextHasNoMarginBottom }
label={ label }
hideLabelFromVision={ hideLabelFromVision }
id={ id }
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/textarea-control/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { BaseControlProps } from '../base-control/types';

export type TextareaControlProps = Pick<
BaseControlProps,
'hideLabelFromVision' | 'help' | 'label'
'hideLabelFromVision' | 'help' | 'label' | '__nextHasNoMarginBottom'
> & {
/**
* A function that receives the new value of the textarea each time it
Expand Down