Skip to content

Commit

Permalink
refactor: update Footer theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mgadewoll committed Jun 26, 2024
1 parent a3b87f1 commit b38cb56
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions packages/docusaurus-theme/src/theme/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
import { css } from '@emotion/react';
import { EuiText, EuiLink, UseEuiTheme, EuiThemeProvider, useEuiMemoizedStyles } from '@elastic/eui';
import {
EuiText,
EuiLink,
UseEuiTheme,
EuiThemeProvider,
useEuiMemoizedStyles,
} from '@elastic/eui';

const ELASTIC_LICENSE_URL = "https://github.com/elastic/eui/blob/main/licenses/ELASTIC-LICENSE-2.0.md";
const SSPL_LICENSE_URL = "https://github.com/elastic/eui/blob/main/licenses/SSPL-LICENSE.md";
const ELASTIC_LICENSE_URL =
'https://github.com/elastic/eui/blob/main/licenses/ELASTIC-LICENSE-2.0.md';
const SSPL_LICENSE_URL =
'https://github.com/elastic/eui/blob/main/licenses/SSPL-LICENSE.md';

const getFooterStyles = ({ euiTheme }: UseEuiTheme) => {
return {
root: css`
background: #1C1E23; // Color not available in EUI
background: #1c1e23; // Color not available in EUI
border-radius: ${euiTheme.size.s} ${euiTheme.size.s} 0 0;
padding: ${euiTheme.size.l};
text-align: center;
`,
text: css`
line-height: var(--eui-line-height-s);
`,
heart: css`
color: ${euiTheme.colors.accent};
`,
Expand All @@ -22,22 +33,21 @@ const Footer = () => {
const styles = useEuiMemoizedStyles(getFooterStyles);

return (
<EuiThemeProvider colorMode="inverse">
<EuiThemeProvider colorMode="dark">
<footer css={styles.root}>
<EuiText textAlign="center" size="s">
EUI is dual-licensed under {' '}
<EuiLink href={ELASTIC_LICENSE_URL}>
Elastic License 2.0
</EuiLink>
<EuiText textAlign="center" size="s" css={styles.text}>
EUI is dual-licensed under{' '}
<EuiLink href={ELASTIC_LICENSE_URL}>Elastic License 2.0</EuiLink>
{' and '}
<EuiLink href={SSPL_LICENSE_URL}>
Server Side Public License, v 1
</EuiLink>
{' | '}
Crafted with <span role="img" aria-label="love" css={styles.heart}></span> by{' '}
<EuiLink href="https://elastic.co">
Elastic
</EuiLink>
Crafted with{' '}
<span role="img" aria-label="love" css={styles.heart}>
</span>{' '}
by <EuiLink href="https://elastic.co">Elastic</EuiLink>
</EuiText>
</footer>
</EuiThemeProvider>
Expand Down

0 comments on commit b38cb56

Please sign in to comment.