From 776faa3806030c648b56ca971799e9277dc4fbae Mon Sep 17 00:00:00 2001 From: Elain T Date: Wed, 13 Dec 2023 11:08:25 -0500 Subject: [PATCH] feat(design): add DaffSizeable to design core's public api (#2653) --- libs/design/src/core/public_api.ts | 1 + libs/design/src/core/sizeable/public_api.ts | 11 +++++++++++ libs/design/src/core/sizeable/sizeable.ts | 9 +++++++++ 3 files changed, 21 insertions(+) create mode 100644 libs/design/src/core/sizeable/public_api.ts diff --git a/libs/design/src/core/public_api.ts b/libs/design/src/core/public_api.ts index a2fbaaa47e..56e8ba84df 100644 --- a/libs/design/src/core/public_api.ts +++ b/libs/design/src/core/public_api.ts @@ -14,3 +14,4 @@ export * from './article-encapsulated/public_api'; export * from './theming/public_api'; export * from './lazy/public_api'; export * from './focus/public_api'; +export * from './sizeable/public_api'; diff --git a/libs/design/src/core/sizeable/public_api.ts b/libs/design/src/core/sizeable/public_api.ts new file mode 100644 index 0000000000..67f6d1cfbb --- /dev/null +++ b/libs/design/src/core/sizeable/public_api.ts @@ -0,0 +1,11 @@ +export { + DaffSizeable, + DaffSizeAllType, + DaffSizeableEnum, + DaffSizeXSmallType, + DaffSizeSmallType, + DaffSizeMediumType, + DaffSizeLargeType, + DaffSizeXLargeType, +} from './sizeable'; +export { daffSizeMixin } from './sizeable-mixin'; diff --git a/libs/design/src/core/sizeable/sizeable.ts b/libs/design/src/core/sizeable/sizeable.ts index d314107a0d..dc6783a025 100644 --- a/libs/design/src/core/sizeable/sizeable.ts +++ b/libs/design/src/core/sizeable/sizeable.ts @@ -1,7 +1,16 @@ +/** + * An interface for giving a component the ability to customize sizing for component-specific UI. + * In order to be sizable, a component class must implement this property. + */ + export interface DaffSizeable { size: T; } +/** + * The possible types that can be passed to a component that implements DaffSizeable + */ + export type DaffSizeXSmallType = 'xs'; export type DaffSizeSmallType = 'sm'; export type DaffSizeMediumType = 'md';