Skip to content
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

feat: update switcher content #1023

Merged
merged 27 commits into from
Oct 19, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3474236
feat: update switcher content
jnm2377 Oct 7, 2020
262373b
fix: consolidate divider margin styles
jnm2377 Oct 7, 2020
a37cd4b
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 8, 2020
0e19130
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 8, 2020
529c515
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 8, 2020
4937ef2
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 9, 2020
52dc917
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 9, 2020
4960efc
fix: design link
jnm2377 Oct 9, 2020
ae9ec83
Merge branch 'switcher-content' of github.com:jnm2377/gatsby-theme-ca…
jnm2377 Oct 9, 2020
6ebb1ee
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 9, 2020
392386a
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 9, 2020
dcdd6b1
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 9, 2020
e3941a9
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 9, 2020
8a980fd
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 10, 2020
b0e53e9
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 10, 2020
b65f7ec
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 10, 2020
3dd5cd3
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 10, 2020
578aed3
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 10, 2020
4fa4f6f
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 10, 2020
ef01de7
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 10, 2020
5d1a702
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 10, 2020
e596739
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 10, 2020
51350f8
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 10, 2020
5f27aca
Merge branch 'main' into switcher-content
kodiakhq[bot] Oct 10, 2020
512f917
fix: community order and ibm.com label
jnm2377 Oct 12, 2020
34c3b03
fix: add back iX
jnm2377 Oct 16, 2020
41a4e39
fix: ibm.com link
jnm2377 Oct 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 22 additions & 15 deletions packages/gatsby-theme-carbon/src/components/Switcher/Switcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import React, {
} from 'react';
import cx from 'classnames';
import useMedia from 'use-media';
import { Locked16 } from '@carbon/icons-react';
import NavContext from '../../util/context/NavContext';
import { nav, open, divider, link, linkDisabled } from './Switcher.module.scss';

Expand Down Expand Up @@ -61,6 +62,7 @@ export const SwitcherDivider = (props) => (
export const SwitcherLink = ({
disabled,
children,
isInternal,
href: hrefProp,
...rest
}) => {
Expand All @@ -79,6 +81,7 @@ export const SwitcherLink = ({
href={href}
{...rest}>
{children}
{isInternal && <Locked16 />}
</a>
</li>
);
Expand All @@ -88,35 +91,39 @@ export const SwitcherLink = ({
// Note: if you change this, update the max-height in the switcher stylesheet
const DefaultChildren = () => (
<>
<SwitcherLink href="https://ibm.com/design">IBM Design</SwitcherLink>
<SwitcherDivider>Foundations</SwitcherDivider>
<SwitcherLink href="https://ibm.com/brand" isInternal>
IBM Brand Center
</SwitcherLink>
<SwitcherLink href="https://ibm.com/design/language">
IBM Design Language
</SwitcherLink>
<SwitcherLink href="https://ibm.com/brand">IBM Brand Center</SwitcherLink>
<SwitcherLink href="https://www.ibm.com/able/">
IBM Accessibility
</SwitcherLink>
<SwitcherDivider>Design disciplines</SwitcherDivider>
<SwitcherDivider>Implementation</SwitcherDivider>
<SwitcherLink href="https://www.carbondesignsystem.com/">
Product
Carbon Design System
</SwitcherLink>
<SwitcherLink href="https://www.ibm.com/standards/web/ibm-dotcom-library/">
Digital
IBM.com Library
</SwitcherLink>
<SwitcherLink href="https://www.ibm.com/design/event/">
IBM Event Design
</SwitcherLink>
<SwitcherDivider>Community</SwitcherDivider>
<SwitcherLink href="https://ibm.com/design" isInternal>
IBM Design
</SwitcherLink>
<SwitcherLink href="https://www.ibm.com/design/event/">Event</SwitcherLink>
<SwitcherLink disabled>Workplace</SwitcherLink>
<SwitcherDivider>Design practices</SwitcherDivider>
<SwitcherDivider>Practices</SwitcherDivider>
<SwitcherLink href="https://www.ibm.com/design/thinking/">
Enterprise Design Thinking
</SwitcherLink>
<SwitcherLink href="https://www.ibm.com/design/research/">
IBM Design Research
<SwitcherLink href="https://www.ibm.com/able/">
IBM Accessibility
</SwitcherLink>
<SwitcherLink href="https://www.ibm.com/design/ai">
IBM Design for AI
</SwitcherLink>
<SwitcherLink href="https://www.ibm.com/services/ibmix/">
IBM iX
<SwitcherLink href="https://www.ibm.com/design/research/">
IBM Design Research
</SwitcherLink>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@
}

.divider {
margin: 32px 1rem 0 1rem;
margin: 32px 1rem 8px 1rem;
color: $carbon--gray-70;
padding-bottom: 4px;
border-bottom: 1px solid $carbon--gray-70;
margin-bottom: 8px;
}

.divider span {
Expand All @@ -52,7 +51,8 @@
.link {
padding: 6px 1rem;
@include carbon--type-style('heading-01');
display: block;
display: flex;
justify-content: space-between;
text-decoration: none;
color: $carbon--gray-30;

Expand Down