Skip to content

Commit

Permalink
Merge pull request #7181 from Sage/FE-6884
Browse files Browse the repository at this point in the history
docs(drawer): fix expanded uncontrolled error with controls
  • Loading branch information
nuria1110 authored Jan 31, 2025
2 parents 0e9595d + 154179c commit 433f4a6
Show file tree
Hide file tree
Showing 15 changed files with 88 additions and 70 deletions.
6 changes: 3 additions & 3 deletions docs/using-draft-js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { Meta } from "@storybook/blocks";

## Installation

The [TextEditor](https://carbon.sage.com/?path=/docs/text-editor--default) and
[Note](https://carbon.sage.com/?path=/docs/note--default) components utilise the `Draft.js` framework to
The [TextEditor](../?path=/docs/text-editor--docs) and
[Note](../?path=/docs/note--docs) components utilise the `Draft.js` framework to
support creating and rendering rich-text content. As such, the framework has been added as a peer-dependency and
consuming projects are required to install it if they wish to use either component, this can be done as an
[npm package](https://www.npmjs.com/package/draft-js).
Expand Down Expand Up @@ -56,7 +56,7 @@ The framework surfaces a range of static methods for initialising the state:
the component with some existing `ContentState` and any `Decorators` and return a new `EditorState` object.
- `EditorState.create(config: EditorStateCreationConfig)` - offers the same as `createWithContent` but enables
initialising the `EditorState` from a config, affording you more fine grain control. For example, it is possible to
define an intitial `SelectionState` using this static method.
define an initial `SelectionState` using this static method.

#### Other useful methods

Expand Down
4 changes: 2 additions & 2 deletions docs/validations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ These states can indicate whether the input is valid or not, and can also preven
### Validation redesign

Carbon is in the process of implementing a new validation pattern to our input components. To opt into this new pattern, you can set the
`validationRedesignOptIn` flag to true in the [CarbonProvider](https://carbon.sage.com/?path=/docs/carbon-provider--docs).
`validationRedesignOptIn` flag to true in the [CarbonProvider](../?path=/docs/carbon-provider--docs).

Component props that are not supported if the opt-in flag is set to true are labelled as [Legacy] in their corresponding prop tables.
These props should not be used if the new validation pattern is being used.
Expand Down Expand Up @@ -98,7 +98,7 @@ Carbon provides a Form component which augments an HTML `<form>` element with:
- footer - a container for rendering "Save", "Cancel" and other custom buttons; it can also be made sticky if wanted
- validation summary - graphical indicator of errors and warnings

For more information check [Form in Storybook](https://carbon.sage.com/?path=/docs/form)
For more information check [Form in Storybook](../?path=/docs/form--docs)

## Formik overview

Expand Down
2 changes: 1 addition & 1 deletion src/components/box/box.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export interface BoxProps
rowGap?: Gap;
/** Design Token for Box Shadow. Note: please check that the box shadow design token you are using is compatible with the Box component. */
boxShadow?: BoxShadowsType;
/** Design Token for Border Radius. Note: please check that the border radius design token you are using is compatible with the Box component. **This prop will not do anything if you have the roundedCornerOptOut flag set in the CarbonProvider** */
/** Design Token for Border Radius. Note: please check that the border radius design token you are using is compatible with the Box component. */
borderRadius?: BorderRadiusType;
/**
* @private
Expand Down
6 changes: 3 additions & 3 deletions src/components/checkbox/checkbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ import { Checkbox, CheckboxGroup } from "carbon-react/lib/components/checkbox";

## Related Components

- Choosing one option from a longer list? [Try Radio Button](https://carbon.sage.com/?path=/docs/radiobutton--default "Radio Button").
- Choosing one option from a very long list? [Try Select](https://carbon.sage.com/?path=/docs/select--default "Select").
- Choosing one option from a highly visible range? [Try Button Toggle](https://carbon.sage.com/?path=/docs/button-toggle--default "Button Toggle").
- Choosing one option from a longer list? [Try Radio Button](../?path=/docs/radio-button--docs).
- Choosing one option from a very long list? [Try Select](../?path=/docs/select--docs).
- Choosing one option from a highly visible range? [Try Button Toggle](../?path=/docs/button-toggle--docs).

## Examples

Expand Down
8 changes: 4 additions & 4 deletions src/components/confirm/confirm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import Confirm from "carbon-react/lib/components/confirm";

## Related Components

- Longer message which stays on-screen? [Try Message](https://carbon.sage.com/?path=/docs/message--default "Message").
- Longer, time sensitive message that must be dismissed? [Try Toast](https://carbon.sage.com/?path=/docs/toast--default "Toast").
- Error or warning message that interrupts activity? [Try Alert](https://carbon.sage.com/?path=/docs/alert--default-alert "Alert").
- Simple task in context? [Try Dialog](https://carbon.sage.com/?path=/docs/dialog--default-story "Dialog").
- Longer message which stays on-screen? [Try Message](../?path=/docs/message--docs).
- Longer, time sensitive message that must be dismissed? [Try Toast](../?path=/docs/toast--docs).
- Error or warning message that interrupts activity? [Try Alert](../?path=/docs/alert--docs).
- Simple task in context? [Try Dialog](../?path=/docs/dialog--docs).

## Examples

Expand Down
2 changes: 2 additions & 0 deletions src/components/date-range/date-range.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Used to filter a Table of data according to a start and end date, or to set two
import DateRange from "carbon-react/lib/components/date-range";
```

## Examples

### Default

<Canvas of={DateRangeStories.DefaultStory} />
Expand Down
8 changes: 0 additions & 8 deletions src/components/definition-list/definition-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import * as DefinitionListStories from "./definition-list.stories";
## Contents

- [Quick Start](#quick-start)
- [Related Components](#related-components)
- [Examples](#examples)
- [Props](#props)

Expand All @@ -21,13 +20,6 @@ import * as DefinitionListStories from "./definition-list.stories";
import { Dl, Dt, Dd } from "carbon-react/lib/components/definition-list";
```

## Related Components

Definition List most of the time is in use with other components. Look at the examples below

- [Tile component with Definition List](/?path=/docs/tile--with-definition-list-default "Tile component with Definition List").
- [Accordion component with Definition List](/?path=/docs/accordion--with-a-definition-list "Accordion component with Definition List").

## Examples

### Default
Expand Down
4 changes: 2 additions & 2 deletions src/components/dialog-full-screen/dialog-full-screen.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import DialogFullScreen from "carbon-react/lib/components/dialog-full-screen";

## Related Components

- Simple task in context? [Try Dialog](https://carbon.sage.com/?path=/docs/dialog--default-story "Dialog").
- Need to refer back to the underlying page? [Try Sidebar](https://carbon.sage.com/?path=/docs/sidebar--default-story "Sidebar").
- Simple task in context? [Try Dialog](../?path=/docs/dialog--docs).
- Need to refer back to the underlying page? [Try Sidebar](../?path=/docs/sidebar--docs).

## Examples

Expand Down
Loading

0 comments on commit 433f4a6

Please sign in to comment.