From 27ff3104aabed240470d351bda02095d8169501f Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 12 Apr 2022 16:09:21 +0200 Subject: chore: add a Summary component --- src/components/atoms/buttons/button-link.stories.tsx | 13 +++++++++++++ src/components/atoms/buttons/button-link.tsx | 14 +++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) (limited to 'src/components/atoms') diff --git a/src/components/atoms/buttons/button-link.stories.tsx b/src/components/atoms/buttons/button-link.stories.tsx index 6fe786b..92b7521 100644 --- a/src/components/atoms/buttons/button-link.stories.tsx +++ b/src/components/atoms/buttons/button-link.stories.tsx @@ -28,6 +28,19 @@ export default { required: true, }, }, + className: { + control: { + type: 'text', + }, + description: 'Set additional classnames to the button link.', + table: { + category: 'Styles', + }, + type: { + name: 'string', + required: false, + }, + }, kind: { control: { type: 'select', diff --git a/src/components/atoms/buttons/button-link.tsx b/src/components/atoms/buttons/button-link.tsx index 81229c8..77a7f7b 100644 --- a/src/components/atoms/buttons/button-link.tsx +++ b/src/components/atoms/buttons/button-link.tsx @@ -7,6 +7,10 @@ export type ButtonLinkProps = { * ButtonLink accessible label. */ 'aria-label'?: string; + /** + * Set additional classnames to the button link. + */ + className?: string; /** * True if it is an external link. Default: false. */ @@ -18,7 +22,7 @@ export type ButtonLinkProps = { /** * ButtonLink shape. Default: rectangle. */ - shape?: 'rectangle' | 'square'; + shape?: 'circle' | 'rectangle' | 'square'; /** * Define an URL as target. */ @@ -32,6 +36,7 @@ export type ButtonLinkProps = { */ const ButtonLink: FC = ({ children, + className, target, kind = 'secondary', shape = 'rectangle', @@ -44,14 +49,17 @@ const ButtonLink: FC = ({ return external ? ( {children} ) : ( - + {children} -- cgit v1.2.3