-
Notifications
You must be signed in to change notification settings - Fork 65
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
✨Overrideable component spike #2410
Conversation
Tested downstream on a create-react-app with |
Awesome! Did you mean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wicked! Suggest we add a story and test for testing that the element is casted with some other props specific to the casted element?
Should we still call the casting prop as
or something else? The name was primarily used because its what styled-components use 🤔
No, react router has its own |
høh, smart! |
Co-authored-by: Michael Marszalek <[email protected]>
Co-authored-by: Michael Marszalek <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
## [0.5.2](https://github.com/equinor/webviz-subsurface-components/compare/[email protected]@0.5.2) (2024-02-13) ### Bug Fixes * bump @equinor/eds-icons from 0.19.3 to 0.21.0 and @equinor/eds-core-react from 0.33.0 to 0.36.0 in /typescript ([#1892](#1892)) ([c7bd611](c7bd611)), closes [equinor/design-system#2367](equinor/design-system#2367) [equinor/design-system#2431](equinor/design-system#2431) [equinor/design-system#2378](equinor/design-system#2378) [equinor/design-system#2399](equinor/design-system#2399) [equinor/design-system#2410](equinor/design-system#2410) [equinor/design-system#2432](equinor/design-system#2432) [equinor/design-system#2442](equinor/design-system#2442) [equinor/design-system#2420](equinor/design-system#2420) [equinor/design-system#2377](equinor/design-system#2377) [equinor/design-system#2384](equinor/design-system#2384) [equinor/design-system#2405](equinor/design-system#2405) [equinor/design-system#2460](equinor/design-system#2460) [equinor/design-system#2247](equinor/design-system#2247) [equinor/design-system#2436](equinor/design-system#2436) [equinor/design-system#2451](equinor/design-system#2451) [equinor/design-system#2303](equinor/design-system#2303) [equinor/design-system#2327](equinor/design-system#2327) [equinor/design-system#2337](equinor/design-system#2337) [equinor/design-system#2335](equinor/design-system#2335) [equinor/design-system#2313](equinor/design-system#2313) [equinor/design-system#3177](equinor/design-system#3177) [#3239](https://github.com/equinor/webviz-subsurface-components/issues/3239) [#3219](https://github.com/equinor/webviz-subsurface-components/issues/3219) [#3177](https://github.com/equinor/webviz-subsurface-components/issues/3177) [#3137](https://github.com/equinor/webviz-subsurface-components/issues/3137) [#3132](https://github.com/equinor/webviz-subsurface-components/issues/3132) [#3121](https://github.com/equinor/webviz-subsurface-components/issues/3121) [#3020](https://github.com/equinor/webviz-subsurface-components/issues/3020) [#3019](https://github.com/equinor/webviz-subsurface-components/issues/3019)
## [1.2.2](https://github.com/equinor/webviz-subsurface-components/compare/[email protected]@1.2.2) (2024-02-13) ### Bug Fixes * bump @equinor/eds-icons from 0.19.3 to 0.21.0 and @equinor/eds-core-react from 0.33.0 to 0.36.0 in /typescript ([#1892](#1892)) ([c7bd611](c7bd611)), closes [equinor/design-system#2367](equinor/design-system#2367) [equinor/design-system#2431](equinor/design-system#2431) [equinor/design-system#2378](equinor/design-system#2378) [equinor/design-system#2399](equinor/design-system#2399) [equinor/design-system#2410](equinor/design-system#2410) [equinor/design-system#2432](equinor/design-system#2432) [equinor/design-system#2442](equinor/design-system#2442) [equinor/design-system#2420](equinor/design-system#2420) [equinor/design-system#2377](equinor/design-system#2377) [equinor/design-system#2384](equinor/design-system#2384) [equinor/design-system#2405](equinor/design-system#2405) [equinor/design-system#2460](equinor/design-system#2460) [equinor/design-system#2247](equinor/design-system#2247) [equinor/design-system#2436](equinor/design-system#2436) [equinor/design-system#2451](equinor/design-system#2451) [equinor/design-system#2303](equinor/design-system#2303) [equinor/design-system#2327](equinor/design-system#2327) [equinor/design-system#2337](equinor/design-system#2337) [equinor/design-system#2335](equinor/design-system#2335) [equinor/design-system#2313](equinor/design-system#2313) [equinor/design-system#3177](equinor/design-system#3177) [#3239](https://github.com/equinor/webviz-subsurface-components/issues/3239) [#3219](https://github.com/equinor/webviz-subsurface-components/issues/3219) [#3177](https://github.com/equinor/webviz-subsurface-components/issues/3177) [#3137](https://github.com/equinor/webviz-subsurface-components/issues/3137) [#3132](https://github.com/equinor/webviz-subsurface-components/issues/3132) [#3121](https://github.com/equinor/webviz-subsurface-components/issues/3121) [#3020](https://github.com/equinor/webviz-subsurface-components/issues/3020) [#3019](https://github.com/equinor/webviz-subsurface-components/issues/3019)
## [0.16.2](https://github.com/equinor/webviz-subsurface-components/compare/[email protected]@0.16.2) (2024-02-13) ### Bug Fixes * bump @equinor/eds-icons from 0.19.3 to 0.21.0 and @equinor/eds-core-react from 0.33.0 to 0.36.0 in /typescript ([#1892](#1892)) ([c7bd611](c7bd611)), closes [equinor/design-system#2367](equinor/design-system#2367) [equinor/design-system#2431](equinor/design-system#2431) [equinor/design-system#2378](equinor/design-system#2378) [equinor/design-system#2399](equinor/design-system#2399) [equinor/design-system#2410](equinor/design-system#2410) [equinor/design-system#2432](equinor/design-system#2432) [equinor/design-system#2442](equinor/design-system#2442) [equinor/design-system#2420](equinor/design-system#2420) [equinor/design-system#2377](equinor/design-system#2377) [equinor/design-system#2384](equinor/design-system#2384) [equinor/design-system#2405](equinor/design-system#2405) [equinor/design-system#2460](equinor/design-system#2460) [equinor/design-system#2247](equinor/design-system#2247) [equinor/design-system#2436](equinor/design-system#2436) [equinor/design-system#2451](equinor/design-system#2451) [equinor/design-system#2303](equinor/design-system#2303) [equinor/design-system#2327](equinor/design-system#2327) [equinor/design-system#2337](equinor/design-system#2337) [equinor/design-system#2335](equinor/design-system#2335) [equinor/design-system#2313](equinor/design-system#2313) [equinor/design-system#3177](equinor/design-system#3177) [#3239](https://github.com/equinor/webviz-subsurface-components/issues/3239) [#3219](https://github.com/equinor/webviz-subsurface-components/issues/3219) [#3177](https://github.com/equinor/webviz-subsurface-components/issues/3177) [#3137](https://github.com/equinor/webviz-subsurface-components/issues/3137) [#3132](https://github.com/equinor/webviz-subsurface-components/issues/3132) [#3121](https://github.com/equinor/webviz-subsurface-components/issues/3121) [#3020](https://github.com/equinor/webviz-subsurface-components/issues/3020) [#3019](https://github.com/equinor/webviz-subsurface-components/issues/3019)
## [1.1.2](https://github.com/equinor/webviz-subsurface-components/compare/[email protected]@1.1.2) (2024-02-13) ### Bug Fixes * bump @equinor/eds-icons from 0.19.3 to 0.21.0 and @equinor/eds-core-react from 0.33.0 to 0.36.0 in /typescript ([#1892](#1892)) ([c7bd611](c7bd611)), closes [equinor/design-system#2367](equinor/design-system#2367) [equinor/design-system#2431](equinor/design-system#2431) [equinor/design-system#2378](equinor/design-system#2378) [equinor/design-system#2399](equinor/design-system#2399) [equinor/design-system#2410](equinor/design-system#2410) [equinor/design-system#2432](equinor/design-system#2432) [equinor/design-system#2442](equinor/design-system#2442) [equinor/design-system#2420](equinor/design-system#2420) [equinor/design-system#2377](equinor/design-system#2377) [equinor/design-system#2384](equinor/design-system#2384) [equinor/design-system#2405](equinor/design-system#2405) [equinor/design-system#2460](equinor/design-system#2460) [equinor/design-system#2247](equinor/design-system#2247) [equinor/design-system#2436](equinor/design-system#2436) [equinor/design-system#2451](equinor/design-system#2451) [equinor/design-system#2303](equinor/design-system#2303) [equinor/design-system#2327](equinor/design-system#2327) [equinor/design-system#2337](equinor/design-system#2337) [equinor/design-system#2335](equinor/design-system#2335) [equinor/design-system#2313](equinor/design-system#2313) [equinor/design-system#3177](equinor/design-system#3177) [#3239](https://github.com/equinor/webviz-subsurface-components/issues/3239) [#3219](https://github.com/equinor/webviz-subsurface-components/issues/3219) [#3177](https://github.com/equinor/webviz-subsurface-components/issues/3177) [#3137](https://github.com/equinor/webviz-subsurface-components/issues/3137) [#3132](https://github.com/equinor/webviz-subsurface-components/issues/3132) [#3121](https://github.com/equinor/webviz-subsurface-components/issues/3121) [#3020](https://github.com/equinor/webviz-subsurface-components/issues/3020) [#3019](https://github.com/equinor/webviz-subsurface-components/issues/3019)
## [1.4.2](https://github.com/equinor/webviz-subsurface-components/compare/[email protected]@1.4.2) (2024-02-13) ### Bug Fixes * bump @equinor/eds-icons from 0.19.3 to 0.21.0 and @equinor/eds-core-react from 0.33.0 to 0.36.0 in /typescript ([#1892](#1892)) ([c7bd611](c7bd611)), closes [equinor/design-system#2367](equinor/design-system#2367) [equinor/design-system#2431](equinor/design-system#2431) [equinor/design-system#2378](equinor/design-system#2378) [equinor/design-system#2399](equinor/design-system#2399) [equinor/design-system#2410](equinor/design-system#2410) [equinor/design-system#2432](equinor/design-system#2432) [equinor/design-system#2442](equinor/design-system#2442) [equinor/design-system#2420](equinor/design-system#2420) [equinor/design-system#2377](equinor/design-system#2377) [equinor/design-system#2384](equinor/design-system#2384) [equinor/design-system#2405](equinor/design-system#2405) [equinor/design-system#2460](equinor/design-system#2460) [equinor/design-system#2247](equinor/design-system#2247) [equinor/design-system#2436](equinor/design-system#2436) [equinor/design-system#2451](equinor/design-system#2451) [equinor/design-system#2303](equinor/design-system#2303) [equinor/design-system#2327](equinor/design-system#2327) [equinor/design-system#2337](equinor/design-system#2337) [equinor/design-system#2335](equinor/design-system#2335) [equinor/design-system#2313](equinor/design-system#2313) [equinor/design-system#3177](equinor/design-system#3177) [#3239](https://github.com/equinor/webviz-subsurface-components/issues/3239) [#3219](https://github.com/equinor/webviz-subsurface-components/issues/3219) [#3177](https://github.com/equinor/webviz-subsurface-components/issues/3177) [#3137](https://github.com/equinor/webviz-subsurface-components/issues/3137) [#3132](https://github.com/equinor/webviz-subsurface-components/issues/3132) [#3121](https://github.com/equinor/webviz-subsurface-components/issues/3121) [#3020](https://github.com/equinor/webviz-subsurface-components/issues/3020) [#3019](https://github.com/equinor/webviz-subsurface-components/issues/3019)
resolves #2338 (perhaps)
This solution does seem to work with button, although you need to set
as="a"
explicitly, as just settinghref
, which converts it to ana
internally, is not picked up by typescript so addingtarget
attribute gets an error in that case.This pr also fixes a bug i came across where height of button is 36px when as=button, 38px when other things due to different default box-sizing. So i added explicit box-sizing: border-box to force always 36px