Skip to content

Commit

Permalink
feat(design): add DaffSizeable to design core's public api (#2653)
Browse files Browse the repository at this point in the history
  • Loading branch information
xelaint committed Dec 13, 2023
1 parent 958dfa7 commit 776faa3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions libs/design/src/core/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
11 changes: 11 additions & 0 deletions libs/design/src/core/sizeable/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export {
DaffSizeable,
DaffSizeAllType,
DaffSizeableEnum,
DaffSizeXSmallType,
DaffSizeSmallType,
DaffSizeMediumType,
DaffSizeLargeType,
DaffSizeXLargeType,
} from './sizeable';
export { daffSizeMixin } from './sizeable-mixin';
9 changes: 9 additions & 0 deletions libs/design/src/core/sizeable/sizeable.ts
Original file line number Diff line number Diff line change
@@ -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<T extends DaffSizeAllType> {
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';
Expand Down

0 comments on commit 776faa3

Please sign in to comment.