diff --git a/src/content/components/uikit/Button/ButtonWrapper.tsx b/src/content/components/uikit/Button/ButtonWrapper.tsx new file mode 100644 index 000000000000..82647d3882f6 --- /dev/null +++ b/src/content/components/uikit/Button/ButtonWrapper.tsx @@ -0,0 +1,25 @@ +import {Gear} from '@gravity-ui/icons'; +import {Button, ButtonProps, Icon} from '@gravity-ui/uikit'; +import {FC} from 'react'; + +export const ButtonWrapper: FC< + ButtonProps & { + startIcon?: boolean; + endIcon?: boolean; + onlyIcon?: boolean; + } +> = (props) => { + return ( +
+ +
+ ); +}; diff --git a/src/content/components/uikit/Button/index.ts b/src/content/components/uikit/Button/index.ts index 089f029cb6a9..efebb076b2d4 100644 --- a/src/content/components/uikit/Button/index.ts +++ b/src/content/components/uikit/Button/index.ts @@ -13,7 +13,7 @@ export const buttonConfig = { readmeUrl: getReadmeUrl(getterOptions), }, sandbox: { - component: dynamic(() => import('@gravity-ui/uikit').then((mod) => mod.Button)), + component: dynamic(() => import('./ButtonWrapper').then((mod) => mod.ButtonWrapper)), props: { view: { type: 'select', @@ -77,6 +77,18 @@ export const buttonConfig = { type: 'switch', defaultValue: false, }, + startIcon: { + type: 'switch', + defaultValue: false, + }, + endIcon: { + type: 'switch', + defaultValue: false, + }, + onlyIcon: { + type: 'switch', + defaultValue: false, + }, width: { type: 'radioButton', values: mappingOptions(['auto', 'max']),