Skip to content

Commit

Permalink
Add aliases for compressed combo-box
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <miki@amazon.com>
  • Loading branch information
AMoo-Miki committed Jul 11, 2024
1 parent 6354761 commit 9544657
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/components/combo_box/combo_box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1106,3 +1106,15 @@ export class OuiComboBox<T> extends Component<
);
}
}

export type OuiCompressedComboBoxProps<T> = Omit<
OuiComboBoxProps<T>,
'compressed'
>;

export class OuiCompressedComboBox<T> extends OuiComboBox<T> {
static defaultProps = {
...OuiComboBox.defaultProps,
compressed: true,
};
}
8 changes: 7 additions & 1 deletion src/components/combo_box/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@
* under the License.
*/

export { OuiComboBox, OuiComboBoxProps } from './combo_box';
export {
OuiComboBox,
OuiComboBoxProps,
OuiCompressedComboBox,
OuiCompressedComboBoxProps,
} from './combo_box';

export * from './combo_box_input';
export * from './combo_box_options_list';
export {
Expand Down
2 changes: 1 addition & 1 deletion src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export {
OuiCompressedColorPickerProps,
} from './color_picker';

export { OuiComboBox } from './combo_box';
export { OuiComboBox, OuiCompressedComboBox } from './combo_box';

export { OuiComment, OuiCommentList } from './comment_list';

Expand Down

0 comments on commit 9544657

Please sign in to comment.