diff --git a/packages/dnb-eufemia/src/components/step-indicator/StepIndicator.d.ts b/packages/dnb-eufemia/src/components/step-indicator/StepIndicator.d.ts index 8d04c661d5c..661862ac202 100644 --- a/packages/dnb-eufemia/src/components/step-indicator/StepIndicator.d.ts +++ b/packages/dnb-eufemia/src/components/step-indicator/StepIndicator.d.ts @@ -1,4 +1,5 @@ import * as React from 'react'; +import { SpacingProps } from '../../shared/types'; import StepIndicatorSidebar from './StepIndicatorSidebar'; export type StepIndicatorMode = 'static' | 'strict' | 'loose'; export type StepIndicatorData = @@ -25,35 +26,6 @@ export type StepIndicatorCurrentStep = string | number; export type StepIndicatorHideNumbers = string | boolean; export type StepIndicatorNoAnimation = string | boolean; export type StepIndicatorSkeleton = string | boolean; -export type StepIndicatorSpace = - | string - | number - | boolean - | { - /** - * Use spacing values like: `small`, `1rem`, `1` or , `16px`. Will use `margin-top`. - */ - top?: string | number | boolean; - - /** - * Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-right`. - */ - right?: string | number | boolean; - - /** - * Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-bottom`. - */ - bottom?: string | number | boolean; - - /** - * Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-left`. - */ - left?: string | number | boolean; - }; -export type StepIndicatorTop = string | number | boolean; -export type StepIndicatorRight = string | number | boolean; -export type StepIndicatorBottom = string | number | boolean; -export type StepIndicatorLeft = string | number | boolean; export type StepIndicatorChildren = | React.ReactNode | ((...args: any[]) => any); @@ -61,7 +33,9 @@ export type StepIndicatorChildren = * NB: Do not change the docs (comments) in here. The docs are updated during build time by "generateTypes.js" and "fetchPropertiesFromDocs.js". */ -export interface StepIndicatorProps extends React.HTMLProps { +export interface StepIndicatorProps + extends React.HTMLProps, + SpacingProps { /** * (required) a unique string-based ID in order to bind together the main component and the sidebar (``). Both have to get the same ID. */ @@ -113,30 +87,6 @@ export interface StepIndicatorProps extends React.HTMLProps { no_animation?: StepIndicatorNoAnimation; skeleton?: StepIndicatorSkeleton; - /** - * Has to be an object with either: `top`, `right`, `bottom` or `left`. Use spacing values like: `small`, `1rem`, `1` or , `16px`. - */ - space?: StepIndicatorSpace; - - /** - * Use spacing values like: `small`, `1rem`, `1` or , `16px`. Will use `margin-top`. - */ - top?: StepIndicatorTop; - - /** - * Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-right`. - */ - right?: StepIndicatorRight; - - /** - * Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-bottom`. - */ - bottom?: StepIndicatorBottom; - - /** - * Use spacing values like: `small`, `1rem`, `1` or , `16px`. will use `margin-left`. - */ - left?: StepIndicatorLeft; class?: string; className?: string; children?: StepIndicatorChildren; diff --git a/packages/dnb-eufemia/src/components/step-indicator/StepIndicatorSidebar.d.ts b/packages/dnb-eufemia/src/components/step-indicator/StepIndicatorSidebar.d.ts index 879121a99f1..664de591487 100644 --- a/packages/dnb-eufemia/src/components/step-indicator/StepIndicatorSidebar.d.ts +++ b/packages/dnb-eufemia/src/components/step-indicator/StepIndicatorSidebar.d.ts @@ -1,4 +1,5 @@ import * as React from 'react'; +import { SpacingProps } from '../../shared/types'; export type StepIndicatorSidebarMode = 'static' | 'strict' | 'loose'; export type StepIndicatorSidebarCurrentStep = string | number; export type StepIndicatorSidebarData = @@ -23,7 +24,8 @@ export type StepIndicatorSidebarData = */ export interface StepIndicatorSidebarProps - extends React.HTMLProps { + extends React.HTMLProps, + SpacingProps { /** * (required) a unique string-based ID in order to bind together the main component and the sidebar (``). Both have to get the same ID. */