-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Emotion] Convert EuiHeader and EuiHeaderLogo (#6878)
* Combine global and Amsterdam and Sass vars - makes it easier to work with and the distinction isn't necessary at this point * Set up `header.styles.ts` * Set up `euiHeaderVariables` and convert more shared CSS - see `src/global_styling/variables/_header.scss` for variable definitions - NOTE: not removing the Sass variables for now as they're used by other Sass files and also by Kibana * Convert position styles to Emotion - remove modifier map + remove `border-top` override - unnecessary since the header already has a `bottom-border`, and unused since I don't see this pattern anywhere in EUI or Kibana + fix incorrect logical mapping - horizontal is `inline` and vertical is `block` 🤦 * Convert default and dark theme styles to Emotion * [EuiHeader] Convert tests to RTL * Remove unused `euiHeaderProfile` Sass - Only used in `src-docs/` and can be totally replaced by `panelPaddingSize` 🤷 - not used anywhere in Kibana * [EuiHeaderLogo] Clean up CSS - Merge Amsterdam overrides and default CSS - Remove unused `@include euiLink` mixin - it's basically not doing anything whatsoever since the hover/focus states are being unset later - remove unused icon size override - XL icons aren't being used anyway and the modifier map was removed in the Emotion conversion * [EuiHeaderLogo] Convert to Emotion + opinionated change - tweak padding-left on logo text to match other padding on `xs` breakpoint + remove unused `vertical-align: middle` CSS - flex handles alignment instead * [EuiHeaderLogo] Update tests - convert to RTL from Enyzme + add a test for `euiHeaderLogo__text` * [EuiHeaderLogo] Reorganize files into its own subdirectory - to match other subcomponents * Add storybook stories * Delete Sass files * changelog
- Loading branch information
Showing
30 changed files
with
446 additions
and
298 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,3 @@ | ||
// Components | ||
@import 'mixins'; | ||
|
||
@import 'header'; | ||
@import 'header_profile'; | ||
@import 'header_links/index'; | ||
@import 'header_logo'; | ||
@import 'header_alert/index'; | ||
@import 'header_section/index'; |
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { EuiHeader, EuiHeaderProps } from './header'; | ||
|
||
const meta: Meta<EuiHeaderProps> = { | ||
title: 'EuiHeader', | ||
component: EuiHeader, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<EuiHeaderProps>; | ||
|
||
export const Playground: Story = { | ||
args: { | ||
position: 'static', | ||
theme: 'default', | ||
}, | ||
}; |
Oops, something went wrong.