From 726a99c8b286eca2eabaee44e4c204c518491816 Mon Sep 17 00:00:00 2001 From: Randall Krauskopf Date: Thu, 10 Oct 2024 09:47:10 -0500 Subject: [PATCH 1/3] add classname prop to ActionList.Description --- .changeset/lucky-lamps-invite.md | 5 +++++ packages/react/src/ActionList/Description.tsx | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .changeset/lucky-lamps-invite.md 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/Description.tsx b/packages/react/src/ActionList/Description.tsx index 8b298418411..1d4e804aab0 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,7 +38,13 @@ export const Description: React.FC + {props.children} ) : ( @@ -47,6 +55,7 @@ export const Description: React.FC {props.children} From 68398ad63698c13449ac51b58dc7e63c0686c1b7 Mon Sep 17 00:00:00 2001 From: Randall Krauskopf Date: Thu, 10 Oct 2024 09:50:07 -0500 Subject: [PATCH 2/3] small location change --- packages/react/src/ActionList/Description.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/ActionList/Description.tsx b/packages/react/src/ActionList/Description.tsx index 1d4e804aab0..10fc980fc51 100644 --- a/packages/react/src/ActionList/Description.tsx +++ b/packages/react/src/ActionList/Description.tsx @@ -50,12 +50,12 @@ export const Description: React.FC {props.children} From 4e5b314310262ee9b141326f3224f40062e1a949 Mon Sep 17 00:00:00 2001 From: Randall Krauskopf Date: Tue, 15 Oct 2024 10:37:01 -0500 Subject: [PATCH 3/3] add prop to docs.json --- packages/react/src/ActionList/ActionList.docs.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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