Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Heading default props & stories, fix disabled prop of CreateableSelect #1248

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading