Skip to content

Commit

Permalink
Fix Heading default props & stories, fix disabled prop of CreateableS…
Browse files Browse the repository at this point in the history
…elect (#1248)
  • Loading branch information
kyleshike authored Jun 3, 2024
1 parent 4c5d58c commit a3eef54
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/Heading/Heading.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ export default meta;
type Story = StoryObj<typeof Heading>;

/**
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,
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/Heading/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions src/Select/CreatableSelect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ const CreatableSelect = ({
className,
components,
defaultValue,
disabled,
getOptionValue,
getOptionLabel,
getOptionValue,
id,
inputId,
isClearable,
isDisabled,
isLoading,
menuWidth,
modal,
Expand All @@ -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}
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -102,7 +102,7 @@ CreatableSelect.defaultProps = {
className: undefined,
components: undefined,
defaultValue: undefined,
disabled: false,
isDisabled: false,
getOptionLabel: undefined,
getOptionValue: undefined,
isClearable: false,
Expand Down

0 comments on commit a3eef54

Please sign in to comment.