From a3eef541fcc95506a72a387505cd1c5c91e06771 Mon Sep 17 00:00:00 2001 From: Kyle Shike Date: Mon, 3 Jun 2024 15:40:13 -0400 Subject: [PATCH] Fix Heading default props & stories, fix disabled prop of CreateableSelect (#1248) --- src/Heading/Heading.stories.tsx | 3 +-- src/Heading/Heading.tsx | 2 +- src/Select/CreatableSelect.jsx | 10 +++++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Heading/Heading.stories.tsx b/src/Heading/Heading.stories.tsx index e7b2765a..5a554815 100644 --- a/src/Heading/Heading.stories.tsx +++ b/src/Heading/Heading.stories.tsx @@ -19,12 +19,11 @@ export default meta; type Story = StoryObj; /** - A default `Heading` as a level `2` with size `xxl` and weight `bold` + A default `Heading` as a level `1` weight `bold` */ export const Default: Story = { args: { children: 'The fastest way to recruit research participants', - level: 1, }, }; diff --git a/src/Heading/Heading.tsx b/src/Heading/Heading.tsx index efa3e810..9a315253 100644 --- a/src/Heading/Heading.tsx +++ b/src/Heading/Heading.tsx @@ -16,7 +16,7 @@ export interface HeadingProps { * logical hierarchy where each heading level represents a sublevel of the previous one, * and avoid skipping levels. */ - level: 1 | 2 | 3 | 4 | 5 | 6; + level?: 1 | 2 | 3 | 4 | 5 | 6; /** * @type {string} * @description Sizes map to the available font-sizes from the defined list of font-types. diff --git a/src/Select/CreatableSelect.jsx b/src/Select/CreatableSelect.jsx index fe787e32..e71ca9da 100644 --- a/src/Select/CreatableSelect.jsx +++ b/src/Select/CreatableSelect.jsx @@ -15,12 +15,12 @@ const CreatableSelect = ({ className, components, defaultValue, - disabled, - getOptionValue, getOptionLabel, + getOptionValue, id, inputId, isClearable, + isDisabled, isLoading, menuWidth, modal, @@ -40,12 +40,12 @@ const CreatableSelect = ({ classNamePrefix="Select" components={components} defaultValue={defaultValue} - disabled={disabled} getOptionLabel={getOptionLabel} getOptionValue={getOptionValue} id={id} inputId={inputId} isClearable={isClearable} + isDisabled={isDisabled} isLoading={isLoading} menuPortalTarget={modal ? document.body : undefined} name={name} @@ -73,7 +73,6 @@ CreatableSelect.propTypes = { className: PropTypes.string, components: PropTypes.any, defaultValue: PropTypes.object, - disabled: PropTypes.bool, getOptionLabel: PropTypes.func, getOptionValue: PropTypes.func, id: PropTypes.string, @@ -83,6 +82,7 @@ CreatableSelect.propTypes = { */ inputId: PropTypes.string.isRequired, isClearable: PropTypes.bool, + isDisabled: PropTypes.bool, isLoading: PropTypes.bool, menuWidth: PropTypes.string, modal: PropTypes.bool, @@ -102,7 +102,7 @@ CreatableSelect.defaultProps = { className: undefined, components: undefined, defaultValue: undefined, - disabled: false, + isDisabled: false, getOptionLabel: undefined, getOptionValue: undefined, isClearable: false,