| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
PatternFly-React preview: https://patternfly-react-pr-2692.surge.sh |
Sorry, something went wrong.
|
Looks good to me, thanks very much, my only question would be if it ¿shouldn't be using the getModifier function? ( as in other components ), something like:
export enum EmptyStateVariant {
large = 'lg',
small = 'sm',
full = ''
}
...
export const EmptyState: React.FunctionComponent<EmptyStateProps> = ({
children,
className = '',
variant = EmptyStateVariant.large,
...props
}: EmptyStateProps) => {
return (
<div className={css(styles.emptyState, getModifier(styles, variant), className)} {...props}>
{children}
</div>
);
};
…________________________________
De: boaz0 <notifications@github.com>
Enviado: martes, 13 de agosto de 2019 0:25
Para: patternfly/patternfly-react <patternfly-react@noreply.github.com>
Cc: Carlos Guzmán Álvarez <carlos.guzman.1@outlook.es>; Mention <mention@noreply.github.com>
Asunto: [patternfly/patternfly-react] fix(emptyState): set the correct size modifier using the variant prop (#2692)
What:
closes #2680<#2680>
//cc @jessiehuff<https://github.com/jessiehuff> can you look at this, am I missing something? 🙏
//cc @carlosga<https://github.com/carlosga> can you look at this?
________________________________
You can view, comment on, or merge this pull request online at:
#2692
Commit Summary
* fix(emptyState): set the correct size modifier using the variant prop
File Changes
* M packages/patternfly-4/react-core/src/components/EmptyState/EmptyState.tsx<https://github.com/patternfly/patternfly-react/pull/2692/files#diff-0> (19)
* M packages/patternfly-4/react-core/src/components/EmptyState/__snapshots__/EmptyState.test.tsx.snap<https://github.com/patternfly/patternfly-react/pull/2692/files#diff-1> (4)
Patch Links:
* https://github.com/patternfly/patternfly-react/pull/2692.patch
* https://github.com/patternfly/patternfly-react/pull/2692.diff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#2692?email_source=notifications&email_token=AAFQGBPJNYPK3KR7MMX3IZDQEHPLZA5CNFSM4ILFQD4KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HE2LHHQ>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAFQGBMCFMCXJCNPXWDOBNTQEHPLZANCNFSM4ILFQD4A>.
|
Sorry, something went wrong.
|
@carlosga - that's a good idea. let me try and do it. |
Sorry, something went wrong.
| /** Content rendered inside the EmptyState */ | ||
| children: React.ReactNode; | ||
| /** Modifies EmptyState max-width */ | ||
| variant?: 'small' | 'large' | 'full'; |
There was a problem hiding this comment.
For docs purposes we decided to type out the variant options
Sorry, something went wrong.
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
| full = 'full' | ||
| } | ||
|
|
||
| const maxWidthModifiers: { [variant in keyof typeof EmptyStateVariant]: string } = { |
There was a problem hiding this comment.
Thanks for the extra type safety.
Sorry, something went wrong.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What:
closes #2680
//cc @jessiehuff can you look at this, am I missing something? 🙏
//cc @carlosga can you look at this?