Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5b256ce
Export without experimental prefix
DaniGuardiola Sep 19, 2024
4332ff0
Update README
DaniGuardiola Sep 19, 2024
bf96c1c
Move Storybook stories and add redirect
DaniGuardiola Sep 19, 2024
bc7ba3a
Add changelog entries
DaniGuardiola Sep 19, 2024
a59fca9
Merge branch 'trunk' of https://github.com/WordPress/gutenberg into s…
DaniGuardiola Sep 23, 2024
a88e769
Fix changelog.
DaniGuardiola Sep 23, 2024
256b9c4
Fix changelog (for real?)
DaniGuardiola Sep 23, 2024
a2ff408
Merge branch 'trunk' of https://github.com/WordPress/gutenberg into s…
DaniGuardiola Sep 24, 2024
5672df5
Fix changelog
DaniGuardiola Sep 24, 2024
a2830eb
Apply feedback.
DaniGuardiola Sep 24, 2024
36e0822
Merge branch 'trunk' of https://github.com/WordPress/gutenberg into s…
DaniGuardiola Sep 24, 2024
b5ec38f
Fix changelog
DaniGuardiola Sep 24, 2024
32a932e
Remove alpha story.
DaniGuardiola Sep 24, 2024
8eff905
README fix.
DaniGuardiola Sep 24, 2024
b043c79
Fix default in README
DaniGuardiola Sep 24, 2024
3ee9576
Merge branch 'trunk' of https://github.com/WordPress/gutenberg into s…
DaniGuardiola Sep 27, 2024
6826228
Fix changelog
DaniGuardiola Sep 27, 2024
d357efd
Remove `showDropdownHeader` prop and the header itself.
DaniGuardiola Sep 27, 2024
c3b5386
Added `showDropdownHeader` as deprecated.
DaniGuardiola Sep 28, 2024
d13b763
Remove deprecation warning
DaniGuardiola Oct 1, 2024
9bd1c5a
Add ignores to jsdocs.
DaniGuardiola Oct 1, 2024
3956f3a
Merge branch 'trunk' of https://github.com/WordPress/gutenberg into s…
DaniGuardiola Oct 1, 2024
c358e96
Merge branch 'trunk' of https://github.com/WordPress/gutenberg into s…
DaniGuardiola Oct 1, 2024
8bebe21
Merge branch 'trunk' of https://github.com/WordPress/gutenberg into s…
DaniGuardiola Oct 1, 2024
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
Next Next commit
Export without experimental prefix
  • Loading branch information
DaniGuardiola committed Sep 19, 2024
commit 5b256cec8f7ac9cbd07f8a90475e36bd4efff3d4
51 changes: 26 additions & 25 deletions packages/components/src/border-control/border-control/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# BorderControl
# BorderControl

<div class="callout callout-alert">
This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
Expand All @@ -21,7 +21,7 @@ a "shape" abstraction.

```jsx
import { useState } from 'react';
import { __experimentalBorderControl as BorderControl } from '@wordpress/components';
import { BorderControl } from '@wordpress/components';
import { __ } from '@wordpress/i18n';

const colors = [
Expand Down Expand Up @@ -58,49 +58,49 @@ colors are organized by multiple origins.

Each color may be an object containing a `name` and `color` value.

- Required: No
- Default: `[]`
- Required: No
- Default: `[]`

### `disableCustomColors`: `boolean`

This toggles the ability to choose custom colors.

- Required: No
- Required: No

### `disableUnits`: `boolean`

This controls whether unit selection should be disabled.

- Required: No
- Required: No

### `enableAlpha`: `boolean`

This controls whether the alpha channel will be offered when selecting
custom colors.

- Required: No
- Default: `false`
- Required: No
- Default: `false`

### `enableStyle`: `boolean`

This controls whether to support border style selection.

- Required: No
- Default: `true`
- Required: No
- Default: `true`

### `hideLabelFromVision`: `boolean`

Provides control over whether the label will only be visible to screen readers.

- Required: No
- Required: No

### `isCompact`: `boolean`

This flags the `BorderControl` to render with a more compact appearance. It
restricts the width of the control and prevents it from expanding to take up
additional space.

- Required: No
- Required: No

### `label`: `string`

Expand All @@ -109,7 +109,7 @@ If provided, a label will be generated using this as the content.
_Whether it is visible only to screen readers is controlled via
`hideLabelFromVision`._

- Required: No
- Required: No

### `onChange`: `( value?: Object ) => void`

Expand All @@ -118,38 +118,39 @@ that selects or clears, border color, style, or width.

_Note: the value may be `undefined` if a user clears all border properties._

- Required: Yes
- Required: Yes

### `shouldSanitizeBorder`: `boolean`

If opted into, sanitizing the border means that if no width or color have been
selected, the border style is also cleared and `undefined` is returned as the
new border value.

- Required: No
- Default: true
- Required: No
- Default: true

### `showDropdownHeader`: `boolean`

Whether or not to render a header for the border color and style picker
dropdown. The header includes a label for the color picker and a close button.

- Required: No
- Required: No

### `size`: `string`

Size of the control.

- Required: No
- Default: `default`
- Allowed values: `default`, `__unstable-large`
- Required: No
- Default: `default`
- Allowed values: `default`, `__unstable-large`

### `value`: `Object`

An object representing a border or `undefined`. Used to set the current border
configuration for this component.

Example:

```js
{
color: '#72aee6',
Expand All @@ -158,25 +159,25 @@ Example:
}
```

- Required: No
- Required: No

### `width`: `CSSProperties[ 'width' ]`

Controls the visual width of the `BorderControl`. It has no effect if the
`isCompact` prop is set to `true`.

- Required: No
- Required: No

### `withSlider`: `boolean`

Flags whether this `BorderControl` should also render a `RangeControl` for
additional control over a border's width.

- Required: No
- Required: No

### `__next40pxDefaultSize`: `boolean`

Start opting into the larger default height that will become the default size in a future version.

- Required: No
- Default: `false`
- Required: No
- Default: `false`
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const UnconnectedBorderControl = (
* a "shape" abstraction.
*
* ```jsx
* import { __experimentalBorderControl as BorderControl } from '@wordpress/components';
* import { BorderControl } from '@wordpress/components';
* import { __ } from '@wordpress/i18n';
*
* const colors = [
Expand Down
6 changes: 5 additions & 1 deletion packages/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ export {
isDefinedBorder as __experimentalIsDefinedBorder,
isEmptyBorder as __experimentalIsEmptyBorder,
} from './border-box-control';
export { BorderControl as __experimentalBorderControl } from './border-control';
export {
/** @deprecated Import `BorderControl` instead. */
BorderControl as __experimentalBorderControl,
BorderControl,
} from './border-control';
export {
default as __experimentalBoxControl,
applyValueToSides as __experimentalApplyValueToSides,
Expand Down