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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(emptyState): set the correct size modifier using the variant prop #2692

Merged
merged 1 commit into from Aug 23, 2019

Conversation

@boaz0
Copy link
Member

boaz0 commented Aug 12, 2019

What:

closes #2680

//cc @jessiehuff can you look at this, am I missing something? 馃檹
//cc @carlosga can you look at this?

@patternfly-build

This comment has been minimized.

Copy link
Contributor

patternfly-build commented Aug 12, 2019

PatternFly-React preview: https://patternfly-react-pr-2692.surge.sh

@carlosga

This comment has been minimized.

Copy link

carlosga commented Aug 13, 2019

@boaz0

This comment has been minimized.

Copy link
Member Author

boaz0 commented Aug 13, 2019

@carlosga - that's a good idea. let me try and do it.

export interface EmptyStateProps extends React.HTMLProps<HTMLDivElement> {
/** Additional classes added to the EmptyState */
className?: string;
/** Content rendered inside the EmptyState */
children: React.ReactNode;
/** Modifies EmptyState max-width */
variant?: 'small' | 'large' | 'full';

This comment has been minimized.

Copy link
@jschuler

jschuler Aug 13, 2019

Collaborator

For docs purposes we decided to type out the variant options

Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
@boaz0 boaz0 force-pushed the boaz0:closes_2680 branch from 601341f to faf67da Aug 13, 2019
}

const maxWidthModifiers: { [variant in keyof typeof EmptyStateVariant]: string } = {

This comment has been minimized.

Copy link
@redallen

redallen Aug 20, 2019

Contributor

Thanks for the extra type safety.

@jschuler jschuler merged commit 26e653b into patternfly:master Aug 23, 2019
8 checks passed
8 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build_integration Your tests passed on CircleCI!
Details
ci/circleci: build_pf3_docs Your tests passed on CircleCI!
Details
ci/circleci: build_pf4_docs Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: test_jest_other Your tests passed on CircleCI!
Details
ci/circleci: test_jest_pf4 Your tests passed on CircleCI!
Details
ci/circleci: upload_docs Your tests passed on CircleCI!
Details
@boaz0

This comment has been minimized.

Copy link
Member Author

boaz0 commented Aug 24, 2019

Thank you!
//cc @jschuler @redallen @carlosga

@boaz0 boaz0 deleted the boaz0:closes_2680 branch Aug 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can鈥檛 perform that action at this time.