-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Page Layouts] Adding content props to EuiPageHeader for pre-determin…
…ed page layout patterns (#4451) * Added content type props to EuiPageHeader * Replaced example usages with props * Setting up a new $`euiPageDefaultMaxWidth` sass token * Updating playground & docs * Fixin amsterdam small and reverse shadows * ‘Fixing’ paddingSize prop on EuiPageContent * Adding custom options for `restrictWidth` * Starting the switch to a new component `EuiPageHeaderContent` * middle; simulate node * Update `useIsWithinBreakpoints` to be conditional * Moving the content to a new component * Cleaning up * Playground fix * more customProps * prevent format errors * Some cleanup and fixing of logic * Added `stretch` to the align prop and fixed tests * cl & comments * Docs clarity * words * Apply suggestions from code review * Render `<header>` element in EuiPageHeader * Adding `iconProps` to optional icon * Renaming `rightSideContent` to `rightSideItems` for better clarity of what the prop type is * Replacing `rightSideResponsive` with a more generic `rightSideGroupProps` Also had to change the EuiFlexGroupProps to include ALL props (like Common) * Apply suggestions from code review Co-authored-by: Greg Thompson <thompson.glowe@gmail.com> * Set deprecation notice for `panelPaddingSize` Co-authored-by: Greg Thompson <thompson.glowe@gmail.com> Co-authored-by: Dave Snider <dave.snider@gmail.com>
- Loading branch information
1 parent
b4947c4
commit 0427fa5
Showing
45 changed files
with
2,108 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ | |
@if (lightness($euiTextColor) < 50) { | ||
background: $euiColorDarkestShade; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import template from '@babel/template'; | ||
|
||
export const generateAst = (value) => { | ||
return template.ast(String(value), { plugins: ['jsx'] }).expression; | ||
}; | ||
|
||
export const generateCustomProps = (props) => { | ||
return props.reduce((obj, item) => { | ||
return { | ||
...obj, | ||
[item]: { | ||
generate: generateAst, | ||
}, | ||
}; | ||
}, {}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.