Skip to content
Open
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
9 changes: 7 additions & 2 deletions docs/guides/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ type: example
<TextInput renderLabel="Name" placeholder="Doe, John Doe"/>
</InstUISettingsProvider>
```

### Breadcrumb

#### New tokens
#### New tokens

- gapSm - Gap spacing for small size breadcrumbs
- gapMd - Gap spacing for medium size breadcrumbs
Expand Down Expand Up @@ -145,7 +146,11 @@ type: example
### FormFieldGroup

- theme variable `errorBorderColor` is now removed
- theme variable `errorFieldsPaddin` is now removed
- theme variable `errorFieldsPadding` is now removed
- theme variable `borderColor` is now removed
- theme variable `borderStyle` is now removed
- theme variable `borderWidth` is now removed
- `error` or `success` messages are no longer displayed when the component is `readOnly` or `disabled`

### FormFieldLayout

Expand Down
5 changes: 2 additions & 3 deletions packages/ui-form-field/src/FormFieldGroup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ import { Component, Children, ReactElement, AriaAttributes } from 'react'

import { Grid } from '@instructure/ui-grid'
import { pickProps, omitProps } from '@instructure/ui-react-utils'
import { withStyleRework as withStyle } from '@instructure/emotion'
import { withStyle } from '@instructure/emotion'

import {
FormFieldLayout,
allowedProps as formFieldLayoutAllowedProps
} from '../FormFieldLayout'

import generateStyle from './styles'
import generateComponentTheme from './theme'

import { allowedProps } from './props'
import type { FormFieldGroupProps } from './props'
Expand All @@ -44,7 +43,7 @@ import type { FormFieldGroupProps } from './props'
category: components
---
**/
@withStyle(generateStyle, generateComponentTheme)
@withStyle(generateStyle)
class FormFieldGroup extends Component<FormFieldGroupProps> {
static readonly componentId = 'FormFieldGroup'

Expand Down
4 changes: 1 addition & 3 deletions packages/ui-form-field/src/FormFieldGroup/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ import type { FormFieldGroupProps, FormFieldGroupStyle } from './props'
* @return {Object} The final style object, which will be used in the component
*/
const generateStyle = (
componentTheme: FormFieldGroupTheme,
_componentTheme: FormFieldGroupTheme,
Comment on lines 38 to +39
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both FormFieldGroup and FormFieldMessages are components that have no tokens anymore and therefore the style.ts files have no theme.

props: FormFieldGroupProps
): FormFieldGroupStyle => {
const { disabled } = props

return {
formFieldGroup: {
label: 'formFieldGroup',
border: `${componentTheme.borderWidth} ${componentTheme.borderStyle} ${componentTheme.borderColor}`,
borderRadius: componentTheme.borderRadius,
Comment on lines 46 to -48
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these tokens were used for the old error style (border around all the children, newError style does not use them), but I forgot to remove them form here: #2273

display: 'block',

...(disabled && {
Expand Down
51 changes: 0 additions & 51 deletions packages/ui-form-field/src/FormFieldGroup/theme.ts

This file was deleted.

5 changes: 2 additions & 3 deletions packages/ui-form-field/src/FormFieldMessages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ import { Component } from 'react'

import { omitProps } from '@instructure/ui-react-utils'

import { withStyleRework as withStyle } from '@instructure/emotion'
import { withStyle } from '@instructure/emotion'

import { FormFieldMessage } from '../FormFieldMessage'

import generateStyle from './styles'
import generateComponentTheme from './theme'

import { allowedProps } from './props'
import type { FormFieldMessagesProps } from './props'
Expand All @@ -54,7 +53,7 @@ type: example
]} />
```
**/
@withStyle(generateStyle, generateComponentTheme)
@withStyle(generateStyle)
class FormFieldMessages extends Component<FormFieldMessagesProps> {
static readonly componentId = 'FormFieldMessages'

Expand Down
45 changes: 0 additions & 45 deletions packages/ui-form-field/src/FormFieldMessages/theme.ts

This file was deleted.

Loading