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: add links to welcome story #12077

Merged
merged 3 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
23 changes: 23 additions & 0 deletions packages/react/.storybook/Welcome/Welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import React from 'react';
import bg from './carbon_bg.png';
import './welcome.scss';
import PackageInfo from './../../package.json';
import Link from '../../src/components/Link';
import { ArrowRight } from '@carbon/icons-react';
import { Stack } from '../../src/components/Stack';

export const Welcome = () => {
return (
Expand All @@ -20,6 +23,26 @@ export const Welcome = () => {
}}>
<h2 className="welcome__heading">@carbon/react</h2>
<h4 className="welcome__heading welcome__heading--subtitle">{`v${PackageInfo.version}`}</h4>
<Stack>
<Link
href="https://v10-react.carbondesignsystem.com/"
className="welcome__link"
renderIcon={ArrowRight}>
v10 Storybook
</Link>
<Link
href="https://v10.carbondesignsystem.com/"
className="welcome__link"
renderIcon={ArrowRight}>
v10 website
</Link>
<Link
href="https://github.com/carbon-design-system/carbon/tree/main/packages/react"
className="welcome__link"
renderIcon={ArrowRight}>
Github repo
</Link>
</Stack>
</div>
);
};
15 changes: 13 additions & 2 deletions packages/react/.storybook/Welcome/welcome.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use '@carbon/styles/scss/theme';
@use '@carbon/styles/scss/type';
@use '@carbon/styles/scss/colors';

.container-welcome {
/* stylelint-disable-next-line declaration-no-important */
Expand All @@ -18,9 +18,20 @@
.welcome__heading {
@include type.type-style('productive-heading-07');

color: theme.$text-inverse;
color: colors.$white;
}

.welcome__heading--subtitle {
font-weight: 600;
}

.welcome__link,
.welcome__link:hover,
.welcome__link.cds--link:visited {
margin-top: 1rem;
color: colors.$blue-40;
}

.welcome__link:first-child {
margin-top: 2rem;
}