diff --git a/.changeset/eleven-cameras-hammer.md b/.changeset/eleven-cameras-hammer.md new file mode 100644 index 00000000000..f3ca0df772b --- /dev/null +++ b/.changeset/eleven-cameras-hammer.md @@ -0,0 +1,5 @@ +--- +"@primer/react": major +--- + +Update ActionList component and related components to no longer support sx/styled-components diff --git a/packages/react/src/ActionList/ActionList.docs.json b/packages/react/src/ActionList/ActionList.docs.json index 6afbe71c766..ccaf7865466 100644 --- a/packages/react/src/ActionList/ActionList.docs.json +++ b/packages/react/src/ActionList/ActionList.docs.json @@ -36,11 +36,6 @@ "type": "AriaRole", "defaultValue": "", "description": "ARIA role describing the function of the list. `listbox` and `menu` are a common values." - }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true } ], "subcomponents": [ @@ -113,11 +108,6 @@ "required": false, "description": "id to attach to the root element of the Item", "defaultValue": "" - }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true } ] }, @@ -144,11 +134,6 @@ "required": false, "description": "", "defaultValue": "" - }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true } ] }, @@ -183,11 +168,6 @@ "required": false, "description": "Text describing why the item is inactive. This may be used when an item's usual functionality\nis unavailable due to a system error such as a database outage.", "defaultValue": "" - }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true } ], "passthrough": { @@ -204,11 +184,6 @@ "defaultValue": "", "required": true, "description": "Icon (or similar) positioned before item text." - }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true } ] }, @@ -221,11 +196,6 @@ "defaultValue": "", "required": true, "description": "Visual positioned after item text." - }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true } ] }, @@ -282,11 +252,6 @@ "defaultValue": "'inline'", "description": "`inline` descriptions are positioned beside primary text. `block` descriptions are positioned below primary text." }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true - }, { "name": "className", "type": "string | undefined", @@ -337,11 +302,6 @@ "defaultValue": "h3", "required": false, "description": "The level of the heading and it is only required (enforce by runtime warning) for lists. (i.e. not required for ActionMenu or listbox roles)" - }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true } ] }, @@ -385,22 +345,6 @@ "type": "AriaRole", "defaultValue": "", "description": "ARIA role describing the function of the list inside the group. `listbox` and `menu` are a common values." - }, - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true - } - ] - }, - { - "filePath": "/Users/mperrotti/work-dir/react/packages/react/src/ActionList/Divider.tsx", - "name": "ActionList.Divider", - "props": [ - { - "name": "sx", - "type": "SystemStyleObject", - "deprecated": true } ] } diff --git a/packages/react/src/ActionList/Description.tsx b/packages/react/src/ActionList/Description.tsx index c4624c6f061..9a9283ee567 100644 --- a/packages/react/src/ActionList/Description.tsx +++ b/packages/react/src/ActionList/Description.tsx @@ -1,9 +1,7 @@ import React from 'react' import Truncate from '../Truncate' -import type {SxProp} from '../sx' import {ItemContext} from './shared' import classes from './ActionList.module.css' -import {BoxWithFallback} from '../internal/components/BoxWithFallback' import {clsx} from 'clsx' export type ActionListDescriptionProps = { @@ -16,17 +14,18 @@ export type ActionListDescriptionProps = { variant?: 'inline' | 'block' className?: string + style?: React.CSSProperties /** * Whether the inline description should truncate the text on overflow. */ truncate?: boolean -} & SxProp +} export const Description: React.FC> = ({ variant = 'inline', - sx, className, truncate, + style, ...props }) => { const {blockDescriptionId, inlineDescriptionId} = React.useContext(ItemContext) @@ -45,15 +44,14 @@ export const Description: React.FC {props.children} - + ) } else { return ( @@ -61,6 +59,7 @@ export const Description: React.FC> = ({sx, className}) => { +export const Divider: React.FC> = ({className, style}) => { return ( -