ant-design icon indicating copy to clipboard operation
ant-design copied to clipboard

Layout.Header light theme

Open Kamahl19 opened this issue 3 years ago • 2 comments

What problem does this feature solve?

Layout.Header background color is set to dark https://github.com/ant-design/ant-design/blob/d80fa29d89857590b8af74fd461c8643da6b719e/components/layout/style/index.ts#L220 and there is no theme prop or any token which could change this.

Menu has a theme prop. When we render Menu inside Layout.Header we should be able to set both either to light or dark theme so that they work together nicely.

Here is a simple demo https://codesandbox.io/s/header-content-footer-antd-5-1-6-forked-c1e3u4?file=/demo.tsx

What does the proposed API look like?

<Layout.Header theme="light | dark" />

Kamahl19 avatar Jan 24 '23 09:01 Kamahl19

@Kamahl19

You are right here that we need to build this feature, But I observe that if we use a theme prop for the header it will contain white color, here we face more issues it mixes with the second section if it has white color, so if give white color to the header need also heard shadow or border which is identify this is a header section

image

image

NadirBakhsh avatar Jan 25 '23 17:01 NadirBakhsh

I also meet the problom. In ConfigProvider, I set the defaultAlgorithm, but the Header in layout is dark.

image

leo220yuyaodog avatar Jan 26 '23 01:01 leo220yuyaodog

Trace in https://github.com/ant-design/ant-design/issues/38975

MadCcc avatar Feb 01 '23 08:02 MadCcc