From 056d98d03af1ef3bd4dc079f03e510852b935810 Mon Sep 17 00:00:00 2001 From: Nikita Kononenko Date: Fri, 20 Dec 2024 16:48:45 -0800 Subject: [PATCH] Add information about hrefComponent and NextJS Link Signed-off-by: Nikita Kononenko --- src/components/Button/README.md | 86 ++++++++++++++++++++++----------- 1 file changed, 59 insertions(+), 27 deletions(-) diff --git a/src/components/Button/README.md b/src/components/Button/README.md index 0c86e93e3..0961e006d 100644 --- a/src/components/Button/README.md +++ b/src/components/Button/README.md @@ -446,35 +446,67 @@ LANDING_BLOCK--> +## Next.js +By default, the ` +``` + + + ## Properties -| Name | Description | Type | Default | -| :----------- | :----------------------------------------------------------------- | :-----------------------------: | :-------------: | -| children | Button content. You can use both text and the `` component. | `ReactNode` | | -| className | `class` HTML attribute | `string` | | -| component | Overrides the root component | `ElementType` | `"button"` | -| disabled | Toggles the `disabled` state | `false` | `false` | -| extraProps | Additional properties | `Record` | | -| href | `href` HTML attribute | `string` | | -| id | `id` HTML attribute | `string` | | -| loading | Toggles the `loading` state | `false` | `false` | -| onBlur | `blur` event handler | `Function` | | -| onClick | `click` event handler | `Function` | | -| onFocus | `focus` event handler | `Function` | | -| onMouseEnter | `mouseenter` event handler | `Function` | | -| onMouseLeave | `mouseleave` event handler | `Function` | | -| pin | Sets the button edge style | `string` | `"round-round"` | -| qa | `data-qa` HTML attribute, used for testing | `string` | | -| rel | `rel` HTML attribute | `string` | | -| selected | Toggles the `selected` state | | | -| size | Sets the button size | `string` | `"m"` | -| style | `style` HTML attribute | `React.CSSProperties` | | -| tabIndex | `tabIndex` HTML attribute | `number` | | -| target | `target` HTML attribute | `string` | | -| title | `title` HTML attribute | `string` | | -| type | `type` HTML attribute | `"button"` `"submit"` `"reset"` | `"button"` | -| view | Sets the button appearance | `string` | `"normal"` | -| width | `"auto"` `"max"` | `"auto"` `"max"` | | +| Name | Description | Type | Default | +| :------------ | :----------------------------------------------------------------- | :-----------------------------: | :-------------: | +| children | Button content. You can use both text and the `` component. | `ReactNode` | | +| className | `class` HTML attribute | `string` | | +| component | Overrides the root component | `ElementType` | `"button"` | +| disabled | Toggles the `disabled` state | `false` | `false` | +| extraProps | Additional properties | `Record` | | +| href | `href` HTML attribute | `string` | | +| hrefComponent | Sets the custom link component for the button | `React.ElementType` | `""` | +| id | `id` HTML attribute | `string` | | +| loading | Toggles the `loading` state | `false` | `false` | +| onBlur | `blur` event handler | `Function` | | +| onClick | `click` event handler | `Function` | | +| onFocus | `focus` event handler | `Function` | | +| onMouseEnter | `mouseenter` event handler | `Function` | | +| onMouseLeave | `mouseleave` event handler | `Function` | | +| pin | Sets the button edge style | `string` | `"round-round"` | +| qa | `data-qa` HTML attribute, used for testing | `string` | | +| rel | `rel` HTML attribute | `string` | | +| selected | Toggles the `selected` state | | | +| size | Sets the button size | `string` | `"m"` | +| style | `style` HTML attribute | `React.CSSProperties` | | +| tabIndex | `tabIndex` HTML attribute | `number` | | +| target | `target` HTML attribute | `string` | | +| title | `title` HTML attribute | `string` | | +| type | `type` HTML attribute | `"button"` `"submit"` `"reset"` | `"button"` | +| view | Sets the button appearance | `string` | `"normal"` | +| width | `"auto"` `"max"` | `"auto"` `"max"` | | ## CSS API