diff --git a/.changeset/lucky-lamps-invite.md b/.changeset/lucky-lamps-invite.md new file mode 100644 index 00000000000..08a54a88e55 --- /dev/null +++ b/.changeset/lucky-lamps-invite.md @@ -0,0 +1,5 @@ +--- +'@primer/react': minor +--- + +Add `classname` prop support to `ActionList.Description` component diff --git a/packages/react/src/ActionList/ActionList.docs.json b/packages/react/src/ActionList/ActionList.docs.json index d57c2817ac7..ba78705b808 100644 --- a/packages/react/src/ActionList/ActionList.docs.json +++ b/packages/react/src/ActionList/ActionList.docs.json @@ -246,6 +246,12 @@ { "name": "sx", "type": "SystemStyleObject" + }, + { + "name": "className", + "type": "string | undefined", + "defaultValue": "", + "description": "CSS string" } ] }, @@ -326,4 +332,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/packages/react/src/ActionList/Description.tsx b/packages/react/src/ActionList/Description.tsx index 8b298418411..10fc980fc51 100644 --- a/packages/react/src/ActionList/Description.tsx +++ b/packages/react/src/ActionList/Description.tsx @@ -13,11 +13,13 @@ export type ActionListDescriptionProps = { * - `"block"` - Secondary text is positioned below primary text. */ variant?: 'inline' | 'block' + className?: string } & SxProp export const Description: React.FC> = ({ variant = 'inline', sx = {}, + className, ...props }) => { const styles = { @@ -36,12 +38,19 @@ export const Description: React.FC + {props.children} ) : (