Skip to content

Better type checking for EuiPageBody's component#11

Merged
snide merged 1 commit intosnide:ts/pagefrom
chandlerprall:ts/page
Dec 17, 2019
Merged

Better type checking for EuiPageBody's component#11
snide merged 1 commit intosnide:ts/pagefrom
chandlerprall:ts/page

Conversation

@chandlerprall
Copy link
Copy Markdown
Contributor

Should resolve @thompsongl's concerns in elastic#2669 (comment)

@thompsongl
Copy link
Copy Markdown
Contributor

Cool. I was thinking a generic was the way to go, but hadn't given it any exploration yet

@snide
Copy link
Copy Markdown
Owner

snide commented Dec 16, 2019

Dunno how you two want to solve it, but just a note that I got the original method from the flex group stuff. Should we revisit those types as well?

https://github.com/elastic/eui/blob/master/src/components/flex/flex_item.tsx

@chandlerprall
Copy link
Copy Markdown
Contributor Author

I got the original method from the flex group stuff. Should we revisit those types as well?

Those can be improved, but at least it doesn't preventing any desired props from being provided.

@snide snide merged commit 9152c56 into snide:ts/page Dec 17, 2019
snide pushed a commit that referenced this pull request Jun 24, 2020
* Added EuiTextDiff component

* fixed sass-linting

* removed unwanted exports

* improved Examples, exported all data from component

* used useMemo

* exported props,used for loop

* allow user to pass components

* yarn.lock updated and deletion component used for example

* used id as key, useMemos combined

* removed disableTimeout prop

* used useMemo for renderedHtml

* Changed slider steps to display result

* tranformed to hook

* removed padding , fontSize controll from euiText

* removed unnecessay props

* used EuiTextDiffProps and removed Funcion def

* used ElementType

* Used diff inside useMemo

* populated text-diff module defination

* Update src-docs/src/views/code/code_example.js

Co-authored-by: Chandler Prall <chandler.prall@gmail.com>

* used _colors and eui_colors_dark.scss for text diff, changed slider props

* valueAppend used

* more detailed timeout description

* insertions/dels are recalculated, improved custom components desc

* console.log removed

* created separate section for text diff

* Update src-docs/src/views/text_diff/text_diff_example.js

Co-authored-by: Chandler Prall <chandler.prall@gmail.com>

* setDel , setIns to zero on value change

* Update src-docs/src/views/text_diff/text_diff_timeout.js

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update src-docs/src/views/text_diff/text_diff_example.js

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update src-docs/src/views/text_diff/text_diff_example.js

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update src-docs/src/views/text_diff/text_diff_custom_components.js

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update src/components/code/text_diff.tsx

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update src-docs/src/views/text_diff/text_diff_example.js

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update src-docs/src/views/text_diff/text_diff_example.js

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update src-docs/src/views/text_diff/text_diff_example.js

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update src-docs/src/views/text_diff/text_diff_example.js

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Update src-docs/src/views/text_diff/text_diff_example.js

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* updated custom-components name, added clasName prop, updated text for examples, removed unnecessary info from examples,moved to utilities

* moved to own folder

* handled props directly

* over rides eslint

* resolved conflicts

* Update .eslintrc.js

* added licence

* used license for all files

* removed default  wraper from

* removed timeout example

* Some design/docs additions (#11)

- Adding prop comments
- Fixing text contrast
- Adding snippets
- Added “NEW” badge

* added test, CL, updated branch

* updated test

* fixed snaps

* snaps

* linting fixed

* Update CHANGELOG.md

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants